Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - blodone

#1
Hi,

Nun nochmal auf Deutsch, vielleicht findet das ja ein paar Experten:

Nach reboot ist eine Verbindung über UDP (Wireguard hinter Opnsense) nicht möglich.

Die Source IP (192.168.x.x) soll auf das outbound WAN mit NAT umgesetzt werden wenn pppoe0 WAN Interface genutzt wird, dies funktioniert jedoch nicht nach dem direkten reboot und die Adresse leer ist.

Wenn ich "tcpdump -i pppoe0 port ...." mache, dann seh ich die unveränderte source address (192.168....). Obwohl "Block private networks" gesetzt ist, seh ich das Paket auf dem pppoe0...

Wireguard schickt ca. alle 5 Sekunden ein UDP Paket...
Wenn ich jetzt mein Wireguard Port von 12345 auf 12346 umstelle dann connected es sofort und mit richtigem outbound NAT. Dann nochmal ein reboot der Opnsense
-> wieder keine Verbindung und falsche Source IP auf pppoe0

Inbound NAT / Port-Forwarding hab ich keins mehr aktiv um irgendwelche Fehler auszuschließen.

Mit netcat und dem selben source port & destination -> wird auch nicht NAT translated.
Nur nach einiger Zeit (ca. 1 Minute) Downtime des Wireguard Server und dann aktivierung desselben funktioniert das outbound NAT wieder ohne Probleme.

Ein ähnliches unbehandeltes Problem hab ich gefunden, 2 Jahre alt:
https://forum.opnsense.org/index.php?topic=31351.0

Für mich sieht es so aus als würde durch wiederverwenden von den States kein outbound NAT gemacht wenn sich die WAN Adresse geändert / gesetzt hat und die Verbindung durch das permanente senden von UDP Paketen alle 5 Sekunden nicht zustande kommt, aber so durch den State auch nicht versucht wird das mit neuem NAT umzusetzen.
#2
Ah das ist Inbound NAT, das ist was anderes. Aber hier kannst du auch gut mit tcpdump -i interface port PORT debuggen ob da was durchkommt oder nicht.

Bei Inbound NAT hab ich keine Probleme, nur outbound NAT
#3
Ist das Problem direkt nach reboot aufgetreten?

Bei mir ist folgendes Problem mit pppoe WAN und UDP outbound NAT:
https://forum.opnsense.org/index.php?topic=38525
#4
Bei mir funktionieren UDP NAT auf WAN nicht direkt beim reboot wenn die WAN Adresse nicht bekannt ist und nachträglich gesetzt wird.

https://forum.opnsense.org/index.php?topic=38525

Ist dir das direkt nach dem Reboot aufgefallen?
#5
Hi,


After debugging some time i found out that if i reboot my opnsense box my VPN gateway behind it does not get any connection anymore.

The Source IP (192.168.x.x) in the outbound WAN NAT should be rewritten to the pppoe0 WAN Interface address, but it's left unchanged.

If i "tcpdump -i pppoe0 port ...." i see the unchanged source address. Although i have set Block private networks it's visible with tcpdump and tells me it's on the line

So now if i change my wireguard to another port listening, it'll connect in no time.
Reboot -> not working, same issue on the other port.
I have no port-forward or any rules (cleaned all out).

If i netcat with the same source port to destination it's also not NAT translated.
Only after some time with no traffic (wireguard disabled) the issue is magically resolved like it seems a state is held and NAT translation of a later assigned WAN Interface Address is not possible.

After some search and verification it seems this Issue is already 2 years old:
https://forum.opnsense.org/index.php?topic=31351.0

I tracked down to at least 1 Minute downtime in traffic is cleaning up the states and a new Connection is being NAT translated good. But that has to work out of the box for a professional firewall. This issue cannot be ignored!