PPP Widget 3 if-up if-down scripts
Posted: 16 May 2017, 17:16
Hi!
It would be convenient if the widget supported the launch of the script at the start and stop of the connection (if-up, if-down). Could you add this function? I want to use the tethering for tun0. It is necessary to add iptables rules. For example
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 192.168.8.1 //modem ip
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43.0/24 dev wlan0 scope link table 61
ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61
It would be convenient if the widget supported the launch of the script at the start and stop of the connection (if-up, if-down). Could you add this function? I want to use the tethering for tun0. It is necessary to add iptables rules. For example
iptables -t filter -F FORWARD
iptables -t nat -F POSTROUTING
iptables -t filter -I FORWARD -j ACCEPT
iptables -t nat -I POSTROUTING -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT --to 192.168.8.1 //modem ip
ip rule add from 192.168.43.0/24 lookup 61
ip route add default dev tun0 scope link table 61
ip route add 192.168.43.0/24 dev wlan0 scope link table 61
ip route add broadcast 255.255.255.255 dev wlan0 scope link table 61