Advertisement
Guest User

iptables bridge

a guest
Sep 7th, 2014
288
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #first run this:
  2. echo "1" > /proc/sys/net/ipv4/ip_forward
  3. echo "1" > /proc/sys/net/ipv4/ip_dynaddr
  4.  
  5.  
  6.  
  7.  
  8. #these are the rules, set the up in iptables and then make them permanent either using an init.d script or using rc.local
  9.  
  10. #this allows NAT
  11. iptables -t nat -A POSTROUTING -j MASQUERADE
  12.  
  13. #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)
  14. iptables -A FORWARD -i $EXTIF -o $INTIF -j ACCEPT
  15. iptables -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement