Blocking IP's in the firewall how do I it

Started by Mr. Acro, August 14, 2023, 06:52:28 PM

Previous topic - Next topic
August 14, 2023, 06:52:28 PM Last Edit: August 14, 2023, 06:55:55 PM by Mr. Acro
Hi, i would like to block certain IP's from getting response from me and them, but cant find an guide how to do even, i tried in the Firewall and Rules, but anything i do keeps passing them through opnsense, could anyone explain how do i do it ? Example i would like to block a malicious game server so it doesnt show up anymore, but it still does no matter what i do in the rules

Thanks for any advice!

Can you elaborate on what you're trying to accomplish?  Because WAN rules are for incoming traffic.

See here for a short explainer on how firewall rules work.  https://forum.opnsense.org/index.php?topic=34895.msg170086#msg170086

Just to say am a beginner with opnsense, i wanna block an IP from accessing my network, in / out, i tried in WAN, LAN but it doesnt work.
Simpler, when i see a game server that i dont want to see, i want to block it via IP in the firewall, but where and how ? I did such in the modem but we know how weak modems from IPS's are, so i tried with better solution aka. opnsense.

Normally you don't need rules on WAN interface, because you establish connections only from the LAN side. 

You need to create your block rules on your LAN interface with given ips as destination and with direction IN: https://docs.opnsense.org/manual/firewall.html#direction

You already have an IP_BLOCK hosts which is good to keep number of rules short, you can use this as destination too.
After applying changes, your client shouln't be able to connect to mentioned game server anymore.
Dependent on how your game is getting list of available servers, it may still be shown, but connection is not possible.


I have done as u said in the Rules and also changed from WAN to LAN, the result is still same, its not blocked at all, can connect to the servers i want to be blocked pretty fine, did i do something wrong in the Alias or with Rules again ?

Move your rule to the top of the list so that is the first one to be matched. At present the allow all rule wins being the first.

Thank you all for helping ! The Rule works now as i wanted to :]
Sorry for newbie questions and so on, am pretty fresh at it