This link has been bookmarked by 15 people . It was first bookmarked on 28 Jul 2006, by Antti Kaihola.
-
14 Nov 12
-
#!/bin/sh # Set up forwards for inbound SSH EXT_IP=205.382.29.20 # External IP address EXT_IFACE=eth0 # External Interface INT_IFACE=eth1 # Internal Interface # handy dandy tcp forward function tcp_forward () { local ext_port int_ip echo "$1" | { read int_ip ext_port # create prerouting and appropriate forward from the tuple iptables -A PREROUTING -t nat -p tcp -d $EXT_IP \ --dport $ext_port -j DNAT \ --to-destination $int_ip:22 iptables -A FORWARD -i $EXT_IFACE -o $INT_IFACE \ -p tcp -d $int_ip --dport 22 -m state \ --state NEW -j ACCEPT } tcp_forward " 192.168.1.1 5000" tcp_forward " 192.168.1.2 5001" tcp_forward " 192.168.1.3 5002" tcp_forward " 192.168.1.4 5003" ... tcp_forward " 192.168.1.58 5057" tcp_forward " 192.168.1.59 5058"
-
-
30 Jan 11
-
01 Apr 09
-
30 Mar 09
-
25 Mar 09
-
13 Jan 08
-
20 Nov 07
-
13 Sep 06
-
08 Dec 05
Would you like to comment?
Join Diigo for a free account, or sign in if you are already a member.