What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

possibility to limit access to forwarded port

wiz

Regular Contributor
Hi All,

In the asus firmware it is possible to setup portforwarding. I am looking for a way to limit access from outside to a forwarded port.

So far I have figured out it is setup in iptables with the vserver rules.

Code:
-A VSERVER -p tcp -m tcp  --dport <FORWARDED PORT> -j DNAT --to-destination <INSIDE IP>:<INSIDE PORT>

I figured out a way to alter that line to this:
Code:
-A VSERVER -p tcp -m tcp -s <ALLOWED OUTSIDE IP> --dport <FORWARDED PORT> -j DNAT --to-destination <INSIDE IP>:<INSIDE PORT>

I also found out this section is in /tmp/redirect_rules.

now my questions:

Would it be possible in future releases to limit access to forwarded ports so I don't have to tinker with it?

Would it actually work like this?

Is there a way to make this stick so after a reboot this will still be filtered?

How can I initiate a firewall restart from commandline?
 
Last edited:
This can already be done using a nat-start script. See the Wiki for an example.
 
thanks Rmerlin, I missed this item on wiki.

cheers,

wiz
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top