OPNsense Forum

English Forums => General Discussion => Topic started by: mpisman on October 29, 2023, 12:47:25 AM

Title: Firewall blocking connections even with pass rules
Post by: mpisman on October 29, 2023, 12:47:25 AM
Hi,

Can someone explain me what am I doing wrong?

I am trying to setup a STUN server.

Firewall Rules:

(I know this is not the right way to do this, but I am just trying to manage to send packets from clients to the server).
Any packet from a client to the server is blocked (Default deny / state violation rule). Why are my rules not overriding the default ones? Please, see pictures.

Thanks for any help
Title: Re: Firewall blocking connections even with pass rules
Post by: meyergru on October 29, 2023, 01:25:31 AM
Multiple problems:

1. A STUN server needs two IPv4s. If your ISP only gives you one, you are out of luck (tm). So, the WAN NAT rule is pointless, also it seems you defined a bidirectional NAT rule?
2. If you want a local STUN server (for whatever purpose) on LAN2 and your clients come from LAN2, you will have to set up rules to allow access on port 3478 to both (!) IPv4s of the STUN server. That typ of traffic does never pass WAN at all.
3. Your rules are "in" and "out", usually you don't have to care about the "out" rules, because answers are not blocked per default, just allow "in" traffic from LAN on LAN2 and also check that your default outbound NAT to WAN does not catch that inter-LAN traffic by accident (which it should not if routing is correct).