iptables nat from 192.168.2.0/24 to wlan0 with masquarade
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 21 Jun 2009 18:34:00 +0000 (18:34 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 21 Jun 2009 18:34:00 +0000 (18:34 +0000)
git-svn-id: svn://svn.rot13.org/sysadmin-cookbook@116 191e9f34-6774-4a6d-acfc-7664dacd4a2a

recepies/pxe/nat-192.168.2.0-wlan0.sh [new file with mode: 0755]

diff --git a/recepies/pxe/nat-192.168.2.0-wlan0.sh b/recepies/pxe/nat-192.168.2.0-wlan0.sh
new file mode 100755 (executable)
index 0000000..cbc7edf
--- /dev/null
@@ -0,0 +1,3 @@
+sudo iptables -t nat -F
+sudo iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o wlan0 -j MASQUERADE
+sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"