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!

Firewall - Allow specific IP Addresses to port.

TomT

Regular Contributor
Hi

I'm running Firmware:376.45 (Merlin build) on my AC 68U

I'd like to block all IP Addresses to port 21 except 2 - 3 IP Addresses I allow.
Is that possible ?

if it is I'd then look to do the same to other ports.

Thanks
 
Can't be done through the webui, has to manually be done with iptables.
 
Thanks for the reply.

Can anyone point me in the right direction.. On how to do this.

Thanks
 
Thanks for the reply.

Can anyone point me in the right direction.. On how to do this.

Thanks

Hi,

it is not very difficult, here for example my configaration of an SSH Port only reachable from specific IP:

iptables -t nat -I VSERVER <consecutive number> -p tcp -m tcp -s <ip-Adress> --dport <alternate-port> -j DNAT --to <server-ip in network>:<listen port>

e.g.:
iptables -t nat -I VSERVER 2 -p tcp -m tcp -s 1.2.3.4 --dport 2223 -j DNAT --to 192.168.1.2:22

this can be put into /jffs/scripts/nat-start

You can also find information about this here.

If you need more help, you're welcome
regards Boy1979
 
Last edited:

Similar 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