Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- iptables -t nat -A POSTROUTING -j MASQUERADE
- iptables -t nat -A POSTROUTING -s 172.16.1.0/24 -o br0 -j MASQUERADE
- iptables -t nat -A POSTROUTING -s 172.16.0.0/24 -o br0 -j MASQUERADE
- iptables -A FORWARD -j ACCEPT -i br0 -s 172.16.0.0/24
- iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
- iptables -A INPUT -i lo -j ACCEPT
- /sbin/sysctl -p /etc/sysctl.conf
- brctl setfd br0 4.0
- Which results in these:
- $ sudo iptables -L
- Chain INPUT (policy ACCEPT)
- target prot opt source destination
- ACCEPT all -- anywhere anywhere
- Chain FORWARD (policy ACCEPT)
- target prot opt source destination
- ACCEPT all -- 172.16.0.0/24 anywhere
- ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED
- Chain OUTPUT (policy ACCEPT)
- target prot opt source destination
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement