How to prevent access to management interface from WLAN and DMZ?
-
Change the port to other and put an alias in the box.
I'm sorry. I can't find that box. In the "destination" field I have;
any
Single host or alias
PPTP clients
PPPoE clients
L2TP clients
WAN net
WAN address
LAN net
LAN address
DMZ net
DMZ addressStrange….
-
No. In the port. Select other and you can type an alias in the box to the right.
-
No. In the port. Select other and you can type an alias in the box to the right.
Under the "Destination" field there is a "Log" field. I search like crazy for a "Port" field but I'm unable to find it. Something is wrong. I'm doing this on the DMZ interface. Hmm…
-
Sorry. You have to set the protocol to TCP.
-
No. In the port. Select other and you can type an alias in the box to the right.
Wait! "Destination port range" appeared when I selected TCP under Protocol. Is TCP correct?
-
-
It looks like it is working. I did the same on the WLAN interface. I can ping 192.168.2.1 from WLAN but I can't access the management interface. Is this enough to prevent access? Can other ports than I specified in "admin ports" (80, 443, 22) be used to access the management interface?
-
No. It listens on tcp/443 unless you change it.
It also redirects from http://:80 to https://:443 unless you disable it.
SSH listens on 22 if you enable it and don't change the port.
If you're concerned about more than the management interface, then forget about blocking to the admin_ports and, instead, pass what you want (like ICMP and DNS) and block everything else.
Like:
pass TCP/UDP source DMZ net dest admin_addresses port 53 #Allow DNS
pass ICMP source DMZ net dest admin_addresses # Allow pings to DMZ address
pass ICMP source DMZ net dest WAN Address # Allow pings to WAN address
block any source DMZ net dest admin_addresses any #Block everything else to DMZ address
block any source DMZ net dest WAN address any # Block everything else to WAN address
pass any any any any #Pass everything else. -
No. It listens on tcp/443 unless you change it.
It also redirects from http://:80 to https://:443 unless you disable it.
SSH listens on 22 if you enable it and don't change the port.
If you're concerned about more than the management interface, then forget about blocking to the admin_ports and, instead, pass what you want (like ICMP and DNS) and block everything else.
Like:
pass TCP/UDP source DMZ net dest admin_addresses port 53 #Allow DNS
pass ICMP source DMZ net dest admin_addresses # Allow pings to DMZ address
pass ICMP source DMZ net dest WAN Address # Allow pings to WAN address
block any source DMZ net dest admin_addresses any #Block everything else to DMZ address
block any source DMZ net dest WAN address any # Block everything else to WAN address
pass any any any any #Pass everything else.Thanks for helping me! I use the block rules you mentioned before to isolate WLAN and DMZ the only weakness I'm aware off was the exposed management interfaces. What about IPv6? Do I have to make separate block rules for that as well?
-
Yes. Here are the caveats for creating single rules for both IPv4+IPv6
You can not assign a gateway to a rule that applies to IPv4 and IPv6
You can not assign a protocol other then ICMP, TCP, UDP or TCP/UDP to a rule that applies to IPv4 and IPv6That protocol caveat means no "any".
Looks like you might be able to change some of them to cover both stacks.
-
Don't forget your WAN address(es)
block source DMZ net dest WAN address ports admin_portsFor some reason I did not consider access to management interface from DMZ -> WAN at all. Is that even possible?
-
Yes. It's easily overlooked.
-
@Ip:
Don't forget your WAN address(es)
block source DMZ net dest WAN address ports admin_portsFor some reason I did not consider access to management interface from DMZ -> WAN at all. Is that even possible?
Yes. It's easily overlooked.
On 2.2 this is easier as you can have a rule that has "(self)" as a target which is an internal pf Macro that means "any IP address on the firewall"
-
@Ip:
Don't forget your WAN address(es)
block source DMZ net dest WAN address ports admin_portsFor some reason I did not consider access to management interface from DMZ -> WAN at all. Is that even possible?
Yes. It's easily overlooked.
On 2.2 this is easier as you can have a rule that has "(self)" as a target which is an internal pf Macro that means "any IP address on the firewall"
Good to know. I'm looking forward to 2.2 and the new book :)