OPNsense: blockera en IP-adress från internetåtkomst
Mål:
Blockera en IP-adress (Smart-TV) från att ansluta till Internet, men den ska fortfarande ha tillgång till NASen. Båda är kabelanslutna mot 192.168.1.X.
Övriga nät ifall det spelar roll:
LAN = 192.168.1.X.
VLAN 1 = 192.168.10.X
VLAN 2 = 192.168.20.X
VLAN 3 = 192.168.30.X
Inga floating rules.
Första sökträffen:
https://forum.opnsense.org/index.php?topic=17664.0
“If you configure it like:
LAN Interface inbound
Source -> Device IP
Destination -> Invert LAN
Protocol -> ANY
Action -> Block/Drop
And apply, it should work.
Ensure rule you create the following steps mentioned below is sitting on top of pass LAN rule.”
Detta blockerar visserligen TVn, men blockerar också internet på flera (alla?) andra enheter i nätverket.
Andra sökträffen:
https://forum.opnsense.org/index.php?topic=22528.0
"Make an alias called "rfc1918" (or any other name you like)
Alias rfc1918 contains these networks:
10.0.0.0/8
172.12.0.0/12
192.168.0.0/16
100.64.0.0/10
127.0.0.0/8
In that case, the easiest and best place for the rule in the LAN interface.
GUI> Firewall: Rules: LAN
Direction IN
Source: 192.168.1.101
Port: any
Destination: !rfc1918 (note the ! - Destination invert selected)
Port: any
Gateway: default"
Resultatet blir samma som tidigare, internet blockeras också för andra enheter.
Det känns som att jag missar något grundläggande.
Mina LAN-regler just nu, översta avstängd eftersom den inte fungerar.