About my config

So need to do the listed tasks for my open wrt device its firewall config file:
1.From my local ip address i have to restrict the access to port 22 for all addresses outside the local network
2. i have to restrict the access to an ip address in the local network
3. i have to restrict the access to all protocols that are connected to the port and the ip address and the local ip address

i have no idea how to do it can you guys help me

By default SSH is not allowed from the wan interface, only from the lan.

Restrict it to where? To access the router? To access the internet? Keep in mind that it is pretty hard to restrict it to access other lan hosts.

This doesn't make sense to me.

2 Likes

1.From my local ip address i have to restrict the access to port 22 for all addresses outside the local network

just use the wan

  1. i have to restrict the access to an ip address in the local network
    restricting it to access the internet and the router

3.i have to restrict the access to all protocols that are connected to the port and the ip address and the local ip address

well its just a task i dont know how to do it can you help me with the codes for these tasks

What does "just use the wan" mean?

Go to Network-Firewall-Rules tab. Create 2 rules, one that rejects traffic from lan IP or mac of the host to the router and one that rejects traffic from host to the wan.

I can't tell you how to do it if I don't understand what you want to do. And your description is too generic.

2 Likes

i mean i need codes for these tasks they are for open wrt device firewall

@Arrow456, welcome to the community!

Try it this way:

  • For each listed task, explain what you want to block and why
  • Explain the SRC and DST of all the local and remote hosts you want blocked

(Perhaps if you explain it out more, we can get on the same page...as I've read your 3 tasks, 3 times...and still don't clearly understand...or perhaps you're new to firewalling.)


As I've observed thus far:

  1. This is setup already in the default firewall config
  2. It is unclear of the location of the host/IP you want to restrict access to "in the local network"; it is important to have this information - it's needed to answer you - as has already been noted, no traffic passes a firewall if it's in the same zone and/or [PHY] interface
  3. Please reword and clarify this. Your terminology is unclear. I cannot tell if you mean "physical ports on the device", "TCP/UDP ports" (which are a 2 IP Protocols that use the term "ports"), etc. - this also needs to be clearly understood in order to properly answer your inquiry
2 Likes