Last active
June 30, 2016 21:40
-
-
Save vzool/13c193005c100c77ad8e08c6a30167de to your computer and use it in GitHub Desktop.
iptables Rules to forward clients into openvpn tunnel (WiFi Pineapple)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o tun0 -j MASQUERADE | |
iptables -A FORWARD -s 172.16.42.0/24 -o tun0 -j ACCEPT | |
iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i tun0 -j ACCEPT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment