Toggle between client and router mode on network interface (Linux)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

23 lines
532 B

*filter
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -o eth0 -j ACCEPT
-A FORWARD -o usb0 -j ACCEPT
-A FORWARD -o wlan0 -j ACCEPT
COMMIT
*nat
#:PREROUTING ACCEPT [0:0]
#:POSTROUTING ACCEPT [0:0]
## Use this interface to route traffic from other interfaces to internet
## E.g. traffic from eth0 -> wlan0 -> internet
-A POSTROUTING -o wlan0 -j MASQUERADE
-A POSTROUTING -o eth0 -j MASQUERADE
-A POSTROUTING -o usb0 -j MASQUERADE
COMMIT