Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Blocking IP's in the firewall how do I it
« previous
next »
Print
Pages: [
1
]
Author
Topic: Blocking IP's in the firewall how do I it (Read 2260 times)
Mr. Acro
Newbie
Posts: 4
Karma: 0
Blocking IP's in the firewall how do I it
«
on:
August 14, 2023, 06:52:28 pm »
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!
«
Last Edit: August 14, 2023, 06:55:55 pm by Mr. Acro
»
Logged
CJ
Hero Member
Posts: 832
Karma: 30
Re: Blocking IP's in the firewall how do I it
«
Reply #1 on:
August 15, 2023, 03:06:05 pm »
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
Logged
Have Answer, Will Blog
Mr. Acro
Newbie
Posts: 4
Karma: 0
Re: Blocking IP's in the firewall how do I it
«
Reply #2 on:
August 16, 2023, 03:56:40 am »
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.
Logged
marunjar
Newbie
Posts: 24
Karma: 5
Re: Blocking IP's in the firewall how do I it
«
Reply #3 on:
August 16, 2023, 06:25:58 am »
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.
Logged
Mr. Acro
Newbie
Posts: 4
Karma: 0
Re: Blocking IP's in the firewall how do I it
«
Reply #4 on:
August 30, 2023, 09:58:56 pm »
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 ?
Logged
cookiemonster
Hero Member
Posts: 1823
Karma: 95
Re: Blocking IP's in the firewall how do I it
«
Reply #5 on:
August 30, 2023, 10:02:05 pm »
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.
Logged
Mr. Acro
Newbie
Posts: 4
Karma: 0
Re: Blocking IP's in the firewall how do I it
«
Reply #6 on:
August 30, 2023, 11:47:25 pm »
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
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Blocking IP's in the firewall how do I it