Page 1 of 1

how to use iptables with gargoyle firmware?

Posted: Mon Jun 05, 2017 6:46 am
by plopes1960
Hi all!

I have a tp-link wr1043nd running the latest version of gargoyle.

It's setup as a router (wired) with openvpn client running.

I need to setup a few iptables like those:

Code: Select all

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

iptables -t nat -A PREROUTING -p tcp --dport 13000 -j DNAT --to-destination 192.168.1.5:13000

iptables -I INPUT 3 -i tun0 -p icmp -j ACCEPT
How and where can I do this?

Re: how to use iptables with gargoyle firmware?

Posted: Mon Jun 05, 2017 7:04 am
by Lantis
on the command line
viewtopic.php?f=8&t=8505

Re: how to use iptables with gargoyle firmware?

Posted: Mon Jun 05, 2017 7:21 am
by plopes1960
Lantis wrote:on the command line
viewtopic.php?f=8&t=8505
Many thanks for your prompt answer Lantis!

after log in on cli, should I simply run those commands one by one?

Re: how to use iptables with gargoyle firmware?

Posted: Mon Jun 05, 2017 7:45 am
by Lantis
Yes you run them 1 by 1.
But i don't know what they are intended to do or why. And can't promise you won't cause unexpected behaviour from Gargoyle.

Re: how to use iptables with gargoyle firmware?

Posted: Mon Jun 05, 2017 10:09 am
by plopes1960
But on the first reply, you said by command line.

Ok I got it.

However, I still confused how to manage the iptables on gargoyle firmware.

Anyone can give me a hand?

Re: how to use iptables with gargoyle firmware?

Posted: Mon Jun 12, 2017 12:48 am
by karljboe
Hi, you can easily add them to the running iptables rules, to store them so they are active after next powercycle however is another story. either you have to find where the rules are stored, and add them there or you need to add a new rule in crontab for adding these rules at every boot