firewall iptables

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

helmax
Posts: 9
Joined: Mon Mar 16, 2015 7:14 pm

firewall iptables

Post 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

helmax
Posts: 9
Joined: Mon Mar 16, 2015 7:14 pm

Re: firewall iptables

Post by helmax »

anyone? is for pptp tunnel vpn

tapper
Moderator
Posts: 1076
Joined: Sun Oct 13, 2013 5:49 pm
Location: Stoke-on-trent UK

Re: firewall iptables

Post 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
Linksys WRT3200ACM
NETGEAR Nighthawk R7800
NETGEAR R6260

helmax
Posts: 9
Joined: Mon Mar 16, 2015 7:14 pm

Re: firewall iptables

Post 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

tapper
Moderator
Posts: 1076
Joined: Sun Oct 13, 2013 5:49 pm
Location: Stoke-on-trent UK

Re: firewall iptables

Post by tapper »

I am sorry it was just a guess. I dont no much about iptables.
Linksys WRT3200ACM
NETGEAR Nighthawk R7800
NETGEAR R6260

helmax
Posts: 9
Joined: Mon Mar 16, 2015 7:14 pm

Re: firewall iptables

Post by helmax »

thanks tapper

anyone understand can help me please?

Lantis
Moderator
Posts: 6761
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: firewall iptables

Post 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?
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

helmax
Posts: 9
Joined: Mon Mar 16, 2015 7:14 pm

Re: firewall iptables

Post by helmax »

how i restart firewall?

how use Dnat ?

Lantis
Moderator
Posts: 6761
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: firewall iptables

Post 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
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

helmax
Posts: 9
Joined: Mon Mar 16, 2015 7:14 pm

Re: firewall iptables

Post by helmax »

thanks Lantis but not work
continue using out 1723 :cry:

already try see in services port but dont have for pptp

Post Reply