Home
Help
Search
Login
Register
OPNsense Forum
»
English Forums
»
General Discussion
»
Does a virtual-ip with firewall rule -this firewall- not work?
« previous
next »
Print
Pages: [
1
]
Author
Topic: Does a virtual-ip with firewall rule -this firewall- not work? (Read 1096 times)
RamSense
Hero Member
Posts: 594
Karma: 10
Does a virtual-ip with firewall rule -this firewall- not work?
«
on:
June 21, 2023, 05:30:19 pm »
I have nginx installed op opnsense with: firewall - rules - wan - destination "this firewall" port 80 and one with port 443.
This works with the opnsense-router/ISP ip and with ipv6, but I have added a virtual-ip (VIP) ipv4 and ipv6 to opnsense, this firewall rule does not work for the VIP ipv4?
Is that normal behavior? I would have expected it to work since virtual ip bind to the wan?
I have made a workaround for this by adding a firewall-NAT-portforward rule- with destination "Virtual ip" and port 80 and one for port 443 both to Redirect target IP [Opnsense LAN ip / 192.168.1.1], that works...
But is that how it should be?
Anybody else with this behavior? or knows how to fix this with VIP ipv4?
«
Last Edit: June 21, 2023, 08:39:51 pm by RamSense
»
Logged
zan
Full Member
Posts: 175
Karma: 31
Re: Does a virtual-ip with firewall rule -this firewall- not work?
«
Reply #1 on:
June 22, 2023, 04:32:42 am »
Should work the same.
"This firewall" is just an alias to "self" keyword in pf, means all addresses on all interfaces (all VIPs and tunnel local addresses included).
«
Last Edit: June 22, 2023, 04:39:48 am by zan
»
Logged
RamSense
Hero Member
Posts: 594
Karma: 10
Re: Does a virtual-ip with firewall rule -this firewall- not work?
«
Reply #2 on:
June 22, 2023, 07:22:04 am »
thnx, yes that is what I expected also. But it does not work with the nginx plugin for VIP ipv4.
I only get nginx to work when I add a Nat portforward rule for this VIP to 192.168.1.1 (port 80 and 443).
Is this how the nginx plugin works or is this a bug in nginx plugin / opsense?
N.B. problem still exists after updating to the latest nginx with:
OPNsense 23.1.10_1-amd64
FreeBSD 13.1-RELEASE-p7
OpenSSL 1.1.1u 30 May 2023
«
Last Edit: June 22, 2023, 05:36:43 pm by RamSense
»
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
English Forums
»
General Discussion
»
Does a virtual-ip with firewall rule -this firewall- not work?