Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #first run this:
- echo "1" > /proc/sys/net/ipv4/ip_forward
- echo "1" > /proc/sys/net/ipv4/ip_dynaddr
- #these are the rules, set the up in iptables and then make them permanent either using an init.d script or using rc.local
- #this allows NAT
- iptables -t nat -A POSTROUTING -j MASQUERADE
- #These forward packets from one interface to another INTIF is a placeholder for the internal and EXTIF is the external (ues eth0/wlan0 in their place)
- iptables -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
- iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement