Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
trying to block outbound traffic from a couple of ip addresses
« previous
next »
Print
Pages: [
1
]
Author
Topic: trying to block outbound traffic from a couple of ip addresses (Read 4987 times)
sproket90
Newbie
Posts: 4
Karma: 0
trying to block outbound traffic from a couple of ip addresses
«
on:
January 28, 2021, 12:14:44 am »
HI
I am new to opnsense and am trying to block several ip addresses from accessing internet.
I can put the rule in the firewall but the ip addresses still get to the net. looking at the firewall log live view I am only seeing the wan address of the firewall accessing the net.
I am wondering if the packets are being nat'd before the firewall recognizes them?
Shouldn't I see all the Lan IP addresses going through the firewall? is there a setting i missed.?
TIA
Sproket90
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #1 on:
January 28, 2021, 12:19:35 am »
Put your block rule inbound into the LAN interface, above the default allow to any rules
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #2 on:
January 28, 2021, 12:24:33 am »
Basically traffic flow is: traffic from LAN clients come into OPNsense on the LAN interface, then (on IPv4) get NAT’d and exit OPNsense on the WAN interface with the public IP. There are default rules on both LAN and WAN interfaces to allow this
Logged
sproket90
Newbie
Posts: 4
Karma: 0
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #3 on:
January 28, 2021, 12:28:28 am »
that is what I have above the default rule,
when I access the internet from the blocked IP address I don't see that ip address in the firewall live view
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
trying to block outbound traffic from a couple of ip addresses
«
Reply #4 on:
January 28, 2021, 12:34:13 am »
Destination should be “any”
Edit: or at least “!LAN net” (ie anything other than LAN net, inverse match in the rule) if you want those IPs to be able to access other LAN IPs
«
Last Edit: January 28, 2021, 12:38:25 am by Greelan
»
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #5 on:
January 28, 2021, 12:35:19 am »
And you have the rule applying “out” of the interface. As I said above, should be “in”
Logged
sproket90
Newbie
Posts: 4
Karma: 0
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #6 on:
January 28, 2021, 12:38:40 am »
ah ha.
Thank you that was it!!!
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #7 on:
January 28, 2021, 12:39:47 am »
See also my edit above regarding the destination
Logged
sproket90
Newbie
Posts: 4
Karma: 0
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #8 on:
January 28, 2021, 12:47:09 am »
got it!
Logged
Greelan
Hero Member
Posts: 1028
Karma: 72
Re: trying to block outbound traffic from a couple of ip addresses
«
Reply #9 on:
January 28, 2021, 12:47:23 am »
Actually, even with an “any” destination it should still allow LAN access since that would be layer 2 not layer 3 and therefore not affected by the firewall
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
trying to block outbound traffic from a couple of ip addresses