Jump to content

Iptable Script. Created Iptable Script, How?


Recommended Posts

Ho can make the iptable entries in to a startup script for jasager?

How do I create 2 scripts, one for WAN port routing and 1 for Android USB Tethering?

iptables -A FORWARD -i eth1 -o wlan0 -s 172.16.42.0 -m state --state NEW -j ACCEPT

iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

iptables -A FORWARD -s 172.16.42.0/24 -o usb0 -j ACCEPT

iptables -A FORWARD -d 172.16.42.0/24 -m state --state ESTABLISHED,RELATED -i usb0 -j ACCEPT

iptables -t nat -A POSTROUTING -s 172.16.42.0/24 -o usb0 -j MASQUERADE

Thnks

Link to comment
Share on other sites

Pretty sure you could use the wps button module & put the respective commands into 2 diff button triggers.

Link to comment
Share on other sites

As the WPS button only supports one custom script, then you would put one set of iptables that you use the most at startup, then use the second set for when needed on the custom script with the WPS button and add to it rules to nullify the first set of iptables rules.

Edited by Molotof
Link to comment
Share on other sites

As the WPS button only supports one custom script, then you would put one set of iptables that you use the most at startup, then use the second set for when needed on the custom script with the WPS button and add to it rules to nullify the first set of iptables rules.

I send a new version to Seb, which supports now 4 custom scripts :)

Edited by Whistle Master
Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...