Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
How to block a website / URL [SOLVED]
« previous
next »
Print
Pages: [
1
]
Author
Topic: How to block a website / URL [SOLVED] (Read 11403 times)
kinghnvn
Newbie
Posts: 5
Karma: 0
How to block a website / URL [SOLVED]
«
on:
January 13, 2021, 05:01:53 am »
Hi all,
How to block a website / URL?
Could you please teach me the steps details?
E.g. I want to block this URL
https://www.bbc.com
«
Last Edit: January 13, 2021, 07:40:28 am by kinghnvn
»
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
How to block a website / URL
«
Reply #1 on:
January 13, 2021, 05:37:14 am »
I assume you want to block clients on your LAN from accessing that URL?
If so, one way is:
Create a Host(s) Alias for
www.bbc.com
Then create a firewall rule into the LAN interface, Action Block (or Reject), IP versions IPv4+IPv6, protocol TCP, source any, destination the Alias created above, destination port HTTPS (you can also block HTTP if you want - easiest way to do both would be to create a Port(s) Alias for both HTTP and HTTPS and use that Alias for the destination port in the firewall rule)
Make sure the rule is above the Allow LAN to any rules in the list
«
Last Edit: January 13, 2021, 05:44:10 am by Greelan
»
Logged
kinghnvn
Newbie
Posts: 5
Karma: 0
Re: How to block a website / URL
«
Reply #2 on:
January 13, 2021, 06:05:54 am »
I have tried but still can access to
www.bbc.com
Please find attached files and have look.
Thanks.
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: How to block a website / URL
«
Reply #3 on:
January 13, 2021, 06:12:12 am »
Look where your block rule is placed...
Logged
kinghnvn
Newbie
Posts: 5
Karma: 0
Re: How to block a website / URL
«
Reply #4 on:
January 13, 2021, 06:50:50 am »
Make sure the rule is above the Allow LAN to any rules in the list -> OK, thanks Brother.
«
Last Edit: January 13, 2021, 06:55:44 am by kinghnvn
»
Logged
mihak
Jr. Member
Posts: 70
Karma: 5
Re: How to block a website / URL [SOLVED]
«
Reply #5 on:
January 14, 2021, 03:25:24 am »
Large websites like BBC.com use more than just one IP address, so the advice above will work only when DNS resolution of bbc.com will return that specific IP address you put into the rule. You are up to a game of whack-a-mole if you hope to block large global websites by their IP addresses...
See my other post related to Netflix how to approach blocking with Sensei or DNS.
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
How to block a website / URL [SOLVED]
«
Reply #6 on:
January 14, 2021, 03:29:30 am »
The advice above was to specify the URL (domain, not IP) in the Alias, which creates a table of all IPs to which that URL resolves, which by default is also updated every 300s
«
Last Edit: January 14, 2021, 03:34:30 am by Greelan
»
Logged
reynolds087
Newbie
Posts: 13
Karma: 0
Re: How to block a website / URL [SOLVED]
«
Reply #7 on:
July 08, 2024, 10:21:42 pm »
This feature is not working for me. Please see the attached screenshots. I can still access Google using the recommended firewall rule.
«
Last Edit: July 08, 2024, 10:24:53 pm by reynolds087
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
How to block a website / URL [SOLVED]