Advertisement
core_st

Simple NAT between wlan and lan

Jan 9th, 2014
385
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.37 KB | None | 0 0
  1. #delete and flush
  2. iptables --flush
  3. iptables --table nat --flush
  4. iptables --delete-chain
  5. #delete all chains
  6. iptables --table nat delete-chain
  7. #forwarding and masquearading
  8. iptables --table nat --append POSTROUTING --out-interface wlan0 MASQUERADE
  9. iptables --append FORWARD --in-interface eth0 -j ACCEPT
  10. #packet forwarding enable
  11. echo 1 > /proc/sys/net/ipv4/ip_forward
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement