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 - openMe

#1
May I push this using slightly different wording:

How to duplicate the built-in "let anything OUT from firewall itself" rule with my own non-float rules, so that the built-in rule can be disabled without breaking connections.

Please don't hesitate to ask further details, if needed. I guess one important part - implicit nat rules - is already answered.
#2
Quote from: EricPerl on February 04, 2025, 07:25:58 PMI can't experiment with it (only one WAN IP).

Shouldn't make a difference. The WAN VIP is behaving like a WAN IP on the (current) master node. Usually I don't have failovers (except for tests and OPNsense updates), so one and the same node is almost anytime the master node and thus holds the VIP.

Quote from: EricPerl on February 04, 2025, 07:25:58 PMI'm at a loss as to what you are trying to achieve with OUT rules but that's a different story.

I try to mimic the builtin rules so that for any user traffic (as opposed to administrative access to the OPNsense nodes or OPNsense communication between HA nodes) is handled by my own instead of out-of-the-box builtin rules. So I try to replace the builtin "let out anything from firewall host itself" OUT rule.

Quote from: EricPerl on February 04, 2025, 07:25:58 PMYou might want to specify whether you have IPv6 WAN connectivity as well.

Maybe I should simplify and turn off IPv6 for now, as internally I am only using IPv4 yet.
#3
Thanks for your answers.

Quote from: meyergru on February 02, 2025, 05:59:22 PMAlways remember: implicit NAT firewall rules are prioritized even higher.

I assume, that no implicit NAT rules run, for my NAT setting is "Manual outbound NAT rule generation" and I wouldn't see any NAT rule in the live log, if I ticked "Log packets matched by automatic outbound NAT rules".
I have 1 manual NAT rule, which NATs everything from "Internal LANs" to the OPNsense VIP (I have 2 nodes in HA mode). If I tick "Log packets handled by this rule", I will see NAT in the live log.


Quote from: EricPerl on February 02, 2025, 10:28:17 PMIs there a reason why you don't attach/show the 2 rules (alternate pairs of eyes looking can't hurt)?

Of course not. Float.png shows my Float rules. I tried to mimic a built-in rule. The first one (first row) isn't working (browser not displaying the web page and giving up after time). The only difference between this and the 3rd one is, that I set the interface field to WAN in the first one, hence you see "1" in the number of interfaces column (for whatever it's worth on a Float rule???). Either the 2nd or 3rd rule will work and I do get to my web page. In the example shown, I randomly activated the 3rd one.

Trying to imitate the built-in rule, I noticed that the built-in one is for IPv4+IPv6 AND has the gateway field set to a gateway. Trying to do this on my rule leads to an error, for I am not allowed to set a gateway on a IPv4+IPv6 rule?!

WAN.png shows my WAN rules. Either of these will only get triggered, if no Float rule is activated, because otherwise the Float rules will execute first and processing will stop, because the Floats are quick.
You can see from the picture, that only the first one - an IPv4 only rule with a gw set - works and let me see my web pages. Deactivating the 1st one and activating the 2nd one instead leaves me stuck again.

The corresponding live log snippets, taken while all Float rules were deactivated!, are OK-WAN.png, which shows the 1st, the working WAN rule. ERROR-WAN.png shows the outcome, while the 2nd WAN rule is active and I couldn't get to any web page. I did not attach an error snippet for the faulty Float rule, for it's the same as for the faulty WAN rule.

Traceroute and ping aren't working as well if the "ERROR" rules are in charge. Traceroute then only gets as far as the internal interface (internal LAN IP address) of my OPNsense.

BTW: 10.0.0.20 is the WAN VIP of my OPNsense (NAT in effect) and target IP is microsoft.com

One more thing: ONLY with the Float one will my Wireguard access to internal LAN work...
#4
Is there a difference between a float and interface rule
- regarding the very same interface
- having exactly the same rule setting
- the interface rule gets triggered, if the float rule is off (there is nothing blocking traffic before)

I assumed that, if I consider one interface, the only difference between a float and an interface rule with the same settings is the order of processing: float before interface.

I have a float rule, which only gets triggered on the WAN interface (replacement for the built-in "let anything OUT from firewall itself"). That's what I see in the log.

I set up a rule with exactly the same settings, but on the WAN interface instead of a float one, so the only difference in the rules is the "Interface" field (well, and the Description). Both rules are enabled. As expected, I only see the float rule in the log, as it is quick and gets triggered before interface rules.
Now I disable the float rule and try to refresh a web page or connect to another web page. Browser tries, but I don't get my web page. As soon as I enable the float rule again, the browser loads the page.

I am clueless :-(
#5
German - Deutsch / Re: HA, Zertifikate und WebUI
January 18, 2025, 04:31:39 PM
Hallo,

falls die schon x-mal gefragt und erklärt wurde, bitte ich trotzdem um Hinweis / Link dahin. Ich stehe hier im Regen und finde die Antworten nicht.

Am Ende möchte ich alle OPNsense nodes mit ein und dem gleichen Zertifikat betreiben und dafür nicht Zusatzsoftware, wie Caddy einspielen.

Nochmals vielen Dank im Voraus.
#6
German - Deutsch / HA, Zertifikate und WebUI
January 16, 2025, 02:53:41 PM
Hallo,

eigentlich muss das doch schon mal gefragt worden sein. Allerdings finde ich nur "seltsame" Beiträge oder suche einfach falsch.

Umgebung:
- 2 OPNsense Nodes mit HA konfiguriert
- Unter System -> HA -> Settings - Zeile Services: Certificates sind angehakt
- Unter System -> HA -> Status hat der Acme Client ein grünes "running" Dreieck
- ACME plugin installiert und konfiguriert (sonst gäbe es den acme client wohl auch nicht)

Gewollt: ein LetsEncrypt/ACME Zertifikat - und zwar ein- und dasselbe - soll auf beiden Nodes installiert und für das WebUI genutzt werden.

Nun finde ich in der Dokumentation eigentlich nichts, was mir Infos zu dem Szenario gibt.

- Wird das ACME plugin auf einer (und bei Ausfall) oder beiden Nodes (vermutlich eher) installiert?
- Wird ACME auf beiden Nodes konfiguriert oder wird die Konfiguration durch HA automatisch übertragen (schließlich taucht der acme client ja unter System -> HA -> Status auf)
- Wird ACME auf beiden Nodes enabled? Vermutlich eher nicht (bei meinem Szenario) da dies zur Erzeugung von zwei Zertifikaten mit unterschiedlichen Private Keys führen würde.
- Wird ACME durch HA beim Failover auf der anderen Node enabled? Oder was bedeutet es "Acme client" als Service unter System -> HA -> Status zu sehen?
- Was bedeutet es, wenn System -> HA -> Settings - Zeile Services: Certificates angehakt ist? Werden die Zertifikate, die unter System -> Trust -> Certificates angezeigt werden durch HA automatisch übertragen? Was ist dann mit Root und Intermediate CA Zertifikaten?
- Sind dazu noch weitere Einstellungen unter System -> Trust -> Settings zu setzen?

Gibt es eine Möglichkeit per SCP/SFTP und SSH Zertifikate manuell einzuspielen, also nicht über den Import in der WebUI zu gehen, und diese bestimmten Services (per ssh commands) zuzuordnen?

Ich sag schon mal danke (auch für Hinweise, wo in der Doku ich das übersehen habe;-).
#7
Jawoll, Geschmacksache.

Ich habe die VLANs auf Proxmox-Seite als VLAN-aware definiert und stelle über SDN vInterfaces in den gewünschten VLANs den VMs bereit. Heißt natürlich: bei einem Restore, ggfs. auf anderer HW, muss ich erst auf Proxmox-Seite etwas konfigurieren, bevor OPNsense wieder genauso aufgesetzt oder aus dem Backup zurückgespielt werden kann. LAGG/Bonding ist möglich, habe mich aber für die "physikalische" Trennung entschieden - Geschmack eben und weil es bei mir im LAN ausreicht:-). Bei weniger Ports, z.B. Dual-Port 10 Gb NIC, wäre die VLAN-Lösung mit Bonding vermutlich auch mein Weg, weil einen physikalischen 10 Gb/s WAN Port zu stellen, lohnt sich bei meiner Internetanbindung nicht ;-)
#8
Stimmt, Vodafone hattest du ja schon gesagt.

Ich bin dann hier raus. Mir fällt nichts ein. Höchstens mal ein Test ohne OPNsense.

Bzgl. ISP: die Telekom hat z.B. Probleme mit Cloudflare. Da ist der Zugriff langsam. Wenn man über ein VPN auf Cloudflare zugreift, geht es wieder zügig.

Ich hoffe einer der Wissenden hier kann dir helfen.
#9
Hi,

ich habe ein Mainboard auf dem leider keine getrennten IOMMU Groups gebildet werden. Daher muss ich auf SR-IOV verzichten, weil ich die Lösung mit ACS nicht will. Auch besitzt das Mainboard nur eine Gb-NIC, die ist für Management reserviert.

Unter Proxmox nutze ich einen Port der Intel-NIC für Proxmox HA (Cluster intern), einen für DRBD (Shared Nothing Cluster), einen für OPNsense WAN und einen für interne LANs (VLANs). Routen muss OPNsense nichts, das macht die Netzwerkhardware dahinter.

Mein Einsatzszenario beruht natürlich auf meinen Anforderungen alleine, nicht auf best practices. In der (fernen) Zukunft würde ich nach Hardware gucken, die IOMMU Group und SR-IOV vernünftig unterstützt, eine Dual-Port 10 Gb NIC reinsetzen und eine zusätzliche Schnittstelle je nach Geschwindigkeit der Internetanbindung.
#10
OK,

eine Deep Packt Inspection, wie ein IDS / IPS sie vornimmt, kann natürlich den Durchsatz nach unten ziehen. Insbesondere, wenn das keine echte Firewall-Hardware steht. Wobei: normalerweise bezieht sich das auf über das WAN hereinkommende Pakete, wie CrowdSec auch. Hier hätte ich auch an die Spezialisten übergeben, da ich selbst OPNsense erst ein paar Tage im Einsatz habe und nicht weiß, wie das eingebaute IPS/IDS - ich glaube Suricata - mit Verbindungen umgeht, wo es nicht reingucken kann. So eine Verbindung, wie dein VPN eben.

Die Frage nach dem USG, weil, je nach Modell, nicht übermäßig leistungsfähig und auch hier wieder der Hintergedanke an das noch weiter leistungsvermindernde IDS.

Aufgrund deiner Schilderungen gehe ich davon aus, dass deine VPN Verbindung auf dem Notebook in deiner WIFI-Verbindung "getunnelt" wird. Du hast da zwar eine VPN-IP-Adresse, die ist aber nur deinem Notebook bekannt. Der VPN-Client, z.B. NordVPN, schickt das Ganze eingekapselt über deine interne WIFI Verbindung, also über die interne IP, die du in deinem LAN hast. Damit kann das aber die OPNsense-Regeln für dein normales WIFI nicht umgehen, sondern unterliegt diesen ganz normal.

Mit dem weiteren WAN Interface meinte ich ein drittes Interface in der OPNsense. In deinem Eingangspost hattest du geschrieben

QuoteInterface  |  Device
heimnetz  -> icg1
vlanNIC    -> igc2

Da deine VLANs, sowie dein Heimnetz aber intern (LAN) sind, fehlt in der Liste dein OPNsense WAN Interface.

Unifi Networks
Unifi Controller -> Settings -> Networks -> Eins deiner VLAN Networks auswählen -> da müsste der Haken bei VLA-only Network gesetzt sein
Unter dem Setting WiFi müsste das Network als Network für ein WiFi-Network (SSID) gesetzt sein.

Sag bitte mal wer dein ISP ist und ob du die Geschwindigkeitsproblematik auch bei z.B. Microsoft Downloads hast.

#11
Quote from: micneu on December 08, 2024, 11:42:41 AM
Bitte mehr mehr Informationen zu deinem verwendeten Hardware, Hersteller/Model deines AP

Mmh, er schreibt Unifi. Ich vermute , dass es keine AP Modelle gibt, die mit einem VPN, welches der Client über die Verbindung legt, schneller sind als ohne, oder?
#12
Unifi Umgebung? Hast du ein USG im Einsatz oder wird dessen Rolle von der OPNsense übernommen (so klingt es bei dir)?

Mir ist nicht klar, wie eine auf dem Notebook konfigurierte VPN Verbindung (hat ja nichts mit dem OPNsense VPN Optionen zu tun), die über die auch ohne VPN genutzte WIFI Verbindung läuft, "unter Umgehung von (fast) allem, was OPNsense macht", funktionieren soll. M.E. ist die VPN Verbindung allem auf der OPNsense unterworfen, was für eine WIFI Verbindung ohne VPN auf der OPNsense konfiguriert ist.

Die OPNsense hat noch ein zusätzliches WAN Interface?
Die OPNsense hat IP Adressen in deinen VLANs, ist dort GW und die Routen stimmen?
Deine internen LANs / VLANs unterliegen alle den gleichen Regeln auf der OPNsense (LAN-Seite, If-Groups oder Aliases)?
Ist irgendwo IDS/IPS eingeschaltet?

Da Unifi-Umgebung: Die Netzwerke zu den WIFI SSIDs sind als VLAN only definiert?
#13
Thanks for further explanation. Would you be so kind to tell me (as a newbie to OPNsense) what you mean by "NAT log line"?! In my code snippet I only see one LAN log line and two WAN log lines. Of cause I guess you mean the middle log line (the line in question), because this line is pre-NAT and the topmost line is post_NAT. But for me, again as a noob, I wouldn't know that it is a "NAT log line", for it says WAN at the line's start.

From my point of view the middle log line seemed unsolicited for I did not know that NAT rules don't support labels.
Honestly, I haven't seen this in the documentation (admittedly, I flew over the docs  8)). Can you please point me there?

Now I know I can't show up a label for it, but I can suppress the line by disabling logging for my manual generated NAT rule. Thanks again.
#14
Das hat mich so genervt, dass ich weiter gesucht habe. Die Lösung findet sich hier:

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

bzw. in dem dort auch referenzierten GitHub Issue:

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

Ein Fix ist also bereits in der Mache.
#15
Thanks, that seems the cause. Glad to see that there already is an issue set up.