Page 1 of 2
firewall iptables
Posted: Wed Apr 29, 2015 7:37 pm
by helmax
how work firewall iptables here?
already login shh put my new rule and see is list in iptables
and save
when reboot is gone
iptables -t nat -I OUTPUT -p tcp --dport 1723 -j DNAT --to-destination :57594
for hide pptp port
my router is wr841n tp link with gargoyle 1.7.1
any help thanks a lot
Re: firewall iptables
Posted: Thu Apr 30, 2015 1:38 pm
by helmax
anyone? is for pptp tunnel vpn
Re: firewall iptables
Posted: Thu Apr 30, 2015 2:02 pm
by tapper
what about /etc/firewall.user?
Mine looks like.
# This file is interpreted as shell script.
# Put your custom iptables rules here, they will
# be executed with each firewall (re-)start.
# Internal uci firewall chains are flushed and recreated on reload, so
# put custom rules into the root chains e.g. INPUT or FORWARD or into the
# special user chains, e.g. input_wan_rule or postrouting_lan_rule.
iptables -t nat -I PREROUTING -p tcp --dport 53 -j REDIRECT --to-ports 53
iptables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 53
Re: firewall iptables
Posted: Thu Apr 30, 2015 2:55 pm
by helmax
iptables -t nat -I PREROUTING -p tcp --dport 1723 -j REDIRECT --to-ports 57777
iptables -t nat -I PREROUTING -p udp --dport 1723 -j REDIRECT --to-ports 57777
is that ? i put this and not work
continue using port 1723 for output in pptp
Re: firewall iptables
Posted: Thu Apr 30, 2015 4:48 pm
by tapper
I am sorry it was just a guess. I dont no much about iptables.
Re: firewall iptables
Posted: Thu Apr 30, 2015 5:50 pm
by helmax
thanks tapper
anyone understand can help me please?
Re: firewall iptables
Posted: Thu Apr 30, 2015 8:31 pm
by Lantis
Did you restart the firewall after making those changes in the firewall.user file?
Also instead of a REDIRECT shouldn't it be a DNAT?
Re: firewall iptables
Posted: Fri May 01, 2015 2:50 am
by helmax
how i restart firewall?
how use Dnat ?
Re: firewall iptables
Posted: Fri May 01, 2015 3:07 am
by Lantis
helmax wrote:how i restart firewall?
/usr/lib/gargoyle/restart_firewall.sh
helmax wrote:how use Dnat ?
iptables -t nat -I PREROUTING -p tcp --dport 1723 -j DNAT --to-ports 57777
iptables -t nat -I PREROUTING -p udp --dport 1723 -j DNAT --to-ports 57777
Re: firewall iptables
Posted: Fri May 01, 2015 9:54 am
by helmax
thanks Lantis but not work
continue using out 1723
already try see in services port but dont have for pptp