Advertisement
juubacca

jolla usb and wifi tethering iptables

Oct 11th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. #!/bin/bash
  2. echo 1 > /proc/sys/net/ipv4/ip_forward
  3. iptables -t nat -A POSTROUTING -o rmnet0 -j MASQUERADE
  4. iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
  5. iptables -A FORWARD -i rmnet0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  6. iptables -A FORWARD -i rndis0 -o rmnet0 -j ACCEPT
  7. iptables -A FORWARD -i wlan0 -o rndis0 -m state --state RELATED,ESTABLISHED -j ACCEPT
  8. iptables -A FORWARD -i rndis0 -o wlan0 -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement