Hi everyone,
By running Nmap on my Lubuntu distro in VM and targeting my Windows desktop PC, it seems that a few ports are open. They seem to be related to Windows services mostly, and some crappy things I haven’t identified yet. I’d want now to block them.
Would a rule like this work for example?
ip firewall filter add chain=forward in-interface=bridge out-interface-list=WAN protocol=tcp dst-port=445 action=drop
Even destination ports are visible but CLOSED when doing port scans from the internet.
Why ports are showing as OPEN is very weird, perhaps if you allow ICMP??
The fact that you allow ICMP (1) in the input chain has nothing to do with the ports that appear as open…
Also, the rule in your first post, blocks what comes from inside your Lan and tries to go out to the internet with destination port TCP 445… So, it does not protect you from reaching that device through the internet.. you have to reverse the rule…
ip firewall filter add chain=forward in-interface-list=WAN protocol=tcp dst-port=445 action=drop
No, it wouldn’t work. bridge interface is typically originating interface for traffic generated by router itself. Which contradicts with chain=forward. But then, if you’re filtering using out-interface-list (right thing to do), then most of the time that’s enough (no need to use in-interface). The rest of rule seems OK to me.
Also, the rule in your first post, blocks what comes from inside your Lan and tries to go out to the internet with destination port TCP 445… So, it does not protect you from reaching that device through the internet.. you have to reverse the rule…
ip firewall filter add chain=forward in-interface-list=WAN protocol=tcp dst-port=445 action=drop
>
Blocking what tries to go out to internet would be my goal too.
To make a long story short, I don't want that service to communicate with outside, maybe a microsoft server.
I don't want it to reach my pc either. So, do I need to set two rules for that? Yours and mine?
Thanks
@mur do you know tht the Firewall rules (and not only) are checked sequentially ?
Please place the rules in a correct order, the wiki and some search will help you on that…
Or you can just reset to default and let the firewall as is and only add carefully…