OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of andre2000 »
  • Show Posts »
  • Messages
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

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.

  • Messages
  • Topics
  • Attachments

Messages - andre2000

Pages: [1] 2 3
1
Web Proxy Filtering and Caching / Nginx proxy - grPC possible?
« on: March 20, 2024, 08:26:21 pm »
Hi,

I would like to reverse proxy my local Netbird installation. I cannot find an option to forward grPC, which is supported in nginx since 1.13 (OPNsense has 1.24)

How do I do stuff like grpc_set_header? Template for reference:

Code: [Select]
upstream dashboard {
    # insert the http port of your dashboard container here
    server 127.0.0.1:8011;

    # Improve performance by keeping some connections alive.
    keepalive 10;
}
upstream signal {
    # insert the grpc port of your signal container here
    server 127.0.0.1:10000;
}
upstream management {
    # insert the grpc+http port of your signal container here
    server 127.0.0.1:8012;
}

server {
    # HTTP server config
    listen 80;
    server_name _;

    # 301 redirect to HTTPS
    location / {
            return 301 https://$host$request_uri;
    }
}
server {
    # HTTPS server config
    listen 443 ssl http2;
    server_name _;

    # This is necessary so that grpc connections do not get closed early
    # see https://stackoverflow.com/a/67805465
    client_header_timeout 1d;
    client_body_timeout 1d;

    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        X-Scheme $scheme;
    proxy_set_header        X-Forwarded-Proto https;
    proxy_set_header        X-Forwarded-Host $host;
    grpc_set_header         X-Forwarded-For $proxy_add_x_forwarded_for;

    # Proxy dashboard
    location / {
        proxy_pass http://dashboard;
    }
    # Proxy Signal
    location /signalexchange.SignalExchange/ {
        grpc_pass grpc://signal;
        #grpc_ssl_verify off;
        grpc_read_timeout 1d;
        grpc_send_timeout 1d;
        grpc_socket_keepalive on;
    }
    # Proxy Management http endpoint
    location /api {
        proxy_pass http://management;
    }
    # Proxy Management grpc endpoint
    location /management.ManagementService/ {
        grpc_pass grpc://management;
        #grpc_ssl_verify off;
        grpc_read_timeout 1d;
        grpc_send_timeout 1d;
        grpc_socket_keepalive on;
    }

    ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
    ssl_certificate_key /etc/ssl/certs/ssl-cert-snakeoil.pem;
}

Thank you!

2
23.7 Legacy Series / Re: IP or MAC to a specific user
« on: December 02, 2023, 09:43:26 pm »
You are right in general. However, for my non-guest wlans all MAC are known and whitelisted. Change your MAC = no wifi access.

3
23.7 Legacy Series / IP or MAC to a specific user
« on: December 02, 2023, 08:37:29 am »
Hi,
I am looking to improve the reporting and filtering by attributing connections (from specific IP Addresses, MACs) to users. Through setting up several restrictions I can be relatively sure that a user (device) always has the same IP MAC and IP address in order to access the LAN or internet.

For the first step I would like the Zenarmor reports to include a username, which according to their documentation (https://www.zenarmor.com/docs/guides/user-based-filtering-using-opnsense-captive-portal) would work when using the captive portal. I would like to avoid the users to have to go through an additional authentication, when they are able to connect to WLAN and obtain an IP address it's enough.

Is there another way (except RADIUS or LDAP, which I think will require auth as well) to attribute usernames to IP addresses?

4
23.1 Legacy Series / Re: Intel i225-LM support?
« on: June 01, 2023, 12:45:45 pm »
thank you!

It's a shame, I thought I finally found a suitable Barebone / MiniPC with something more powerful than a Celeron processor and good NICs (ASRock ‎NUC Box-1220P).

5
23.1 Legacy Series / Intel i225-LM support?
« on: June 01, 2023, 11:51:58 am »
Hi,

still with the latest updates I am running into daily disconnects with my Realtek based setup (using VLANs and zenarmor), which need a power cycle to reconnect.

I want to get rid of the Realtek NICs now and am about to pull the trigger on a similar system, but with Intel NICs. The only threads I find about the i225-LM are from last year and older, can I assume these NICs are running flawless now?

Thank you!

6
23.1 Legacy Series / Re: [CALL FOR TESTING] Netmap generic mode queue stall fixes
« on: March 09, 2023, 06:27:59 pm »
okay interesting. on the first mirror the file was kernel-23.1.2-netmap2-amd64.txz, while on the second there seems to be an older version: kernel-23.1.2-netmap-amd64.txz

7
23.1 Legacy Series / Re: [CALL FOR TESTING] Netmap generic mode queue stall fixes
« on: March 09, 2023, 06:21:18 pm »
I am trying to update the kernel, but get the following error message:

Code: [Select]
opnsense-update -zkr 23.1.2-netmap2 && opnsense-shell reboot
Fetching kernel-23.1.2-netmap2-amd64.txz: .......[fetch: https://mirror.dns-root.de/opnsense/FreeBSD:13:amd64/snapshots/sets/kernel-23.1.2-netmap2-amd64.txz.sig: No address record] failed, no signature found

OPNsense is on 23.1.2. I switched the mirror, rebooted but no change.

EDIT: above isn't the error I got before. Resolution works fine. The actual error is this (no signature found):

Fetching kernel-23.1.2-netmap2-amd64.txz: ..[fetch: https://mirror.dns-root.de/opnsense/FreeBSD:13:amd64/snapshots/sets/kernel-23.1.2-netmap2-amd64.txz.sig: Not Found] failed, no signature found


8
Web Proxy Filtering and Caching / Upstream Server for Nginx using a self-signed certificate
« on: July 05, 2022, 07:03:52 pm »
Hi,

I want to reverse proxy a machine that has itself a reverse proxy for :443/SSL termination in front of it. It is using a certificate from my own PKI for it which is trusted all over the network. I don't want to remove this as I don't want it to be accessible unencrypted in the local network.

Using the the Nginx proxy, I now would like to connect to this port 443, but I can't figure out how to trust this certificate. Attached as a screenshot are the last settings I tried, but I am not even sure this is the right place.

Thanks for your help!

9
German - Deutsch / Ein Host im Netzwerk und OPNSense können sich "nicht gegenseitig sehen".
« on: July 05, 2022, 09:48:43 am »
Hallo zusammen,

ich hätte dem Thema gern eine aussagekräftigere Überschrift gegeben, aber ich kanns absolut nicht verstehen und formulieren. Ich bin auch völlig ratlos wo ich suchen kann, habe die Firewall-Einstellungen mehrfach durchsucht. OPNSense Version ist OPNsense 22.1.9_1-amd64

In meinem Netzwerk läuft Homeassistant. Ich habe versucht, diesen über den Nginx Reverse Proxy von aussen verfügbar zu machen. Ein Test mit einem anderen System in meinem Netzwerk zeigt, dass die Nginx Konfiguration grundsätzlich in Ordnung ist. Aber mit Homeassistant klappt das nicht.

OPNSense: 192.168.11.1
Homeassistant: 192.168.11.164

Woran das liegt konnte ich inzwischen eingrenzen:

Wenn ich einen der beiden Hosts versuche vom anderen anzupingen, gibt es immer ein Timeout. Von beiden Hosts aus kann ich jedes andere System in meinem Netzwerk anpingen, und von jedem anderen System funktioniert der Ping auf die beiden IPs. Auch wenn ich vom Homeassistant eine Seite ausserhalb meines Netzwerks anpinge, funktioniert das, die Namensauflösung funktioniert etc.

Ich habe meine Firewall-Einstellungen durchsucht, es gibt keine Regel mit der IP des HA. Ich kann mich nicht erinnern im HA eine FW-Regel erstellt zu haben, weiß auch nicht ob das geht. Im IPS sehe ich keine Meldungen mit der IP des Homeassistant, auch das Deaktivieren macht keinen Unterschied. Der Ping von OPNSense geht an die korrekte Adresse.

Ich habe die Konfiguration von OPNSense heruntergeladen und nach der IP von Homeassistant gesucht. Die finde ich nur dort, wo ich sie auch erwarte:
- in den DHCP Einstellungen
- als Upstream Server in der Nginx Konfiguration
- als Host Override in Unbound

Habt Ihr Ideen wonach ich noch suchen kann? Logs etc stelle ich gern zur Verfügung wenn ich weiß was ihr braucht.

Danke für Eure Unterstützung!


10
General Discussion / Generic VLAN question(s)
« on: May 29, 2022, 08:56:19 pm »
Hi all,

(This is only in part about OPNSense, sorry for that, but I hope this community has the best knowledge about the topic.)

I am thinking about setting up VLANs in order to separate some traffic in my home network (family, home office, guests, IoT, VoIP, VMs, ...) . WLAN is being used by all kinds of devices, having different SSIDs per purpose if that makes sense.

My goal is to separate the traffic for each of these groups, and later to create some firewall rules to define which devices are allowed to see each other. For example create a guest WLAN that only can access the internet, without seeing any of the other devices.

My setup is this:

1. OPNSense
   -> 2.1 Managed Switch (D-Link DGS-1100-16)
    --> 3.1 OpenWRT AP 1
    --> 3.2 OpenWRT AP 2
    --> 3.3 Unmanaged Switch (would that break VLAN?)
      ---> 4.1 OpenWRT AP 3

OPNSense and OpenWRT are running on the latest versions.

All devices using the network are connected to one of the above devices. Reading through several articles I am getting confused, what I understand is: For example I would assign a VLAN tag to a port on the managed switch and the APs. But would this dedicate this port to only VLAN traffic? This seems to be true for a so called static VLAN, so I guess what I want to use is a dynamic VLAN.

OpenWRT now asks me to assign a Device when creating a VLAN there. Which looks like a static VLAN to me? Can I set up a dynamic VLAN across an unmanaged switch? What else do I need to consider beside creating the interfaces, FW rules and DHCP?

Thanks for helping me with that!

11
German - Deutsch / Re: IPSec VPN IOS/IPHONE
« on: November 03, 2020, 12:29:53 pm »
Das kann ich leider erst morgen oder so machen.

In der Zwischenzeit: Wenn ihr nicht auf IPSec angewiesen seid versucht es mal mit Wireguard VPN (das nutze ich inzwischen hauptsächlich) - viel einfacher zu konfigurieren und im Wireguard Client kannst Du die Bedingungen definieren wann automatisch eine Verbindung hergestellt werden soll inkl. DNS Vorgabe. Mein Handy verbindet sich automatisch mit meinem VPN wenn ich nicht mehr mit dem WLAN zu Hause verbunden bin. Verbindungsaufbau und Datendurchsatz sind erheblich schneller als bei IPSec.
Wenn das Dein Use Case ist, würde ich empfehlen vom Aufwand der Konfiguration von IPSec Abstand zu nehmen.

12
German - Deutsch / Re: Verständnisproblem Floating Firewall Rules?
« on: October 09, 2020, 05:54:51 pm »
Hallo Jens,

Vielen Dank für die ausführliche Erläuterung! Das hilft mir sehr weiter.

13
German - Deutsch / Verständnisproblem Floating Firewall Rules?
« on: October 08, 2020, 10:00:05 pm »
Hallo zusammen,

ich bin zwar schon lange mit OPNSense aktiv, hatte aber bislang noch nie einen Grund mich eingehender mit der Firewall zu beschäftigen. Aktuell probiere ich, für einen Webserver einen vorgeschalteten HAProxy zu aktivieren, dafür muss ich die Firewall natürlich anpassen. Ich habe im Wiki gelesen und verstanden dass die Floating Rules vor allen anderen angewendet werden. Dort gibt es als erstes die "Default deny rule".

Nun lege ich auf dem WAN Interface jeweils eine Regel an, die eingehenden Traffic für HTTP / HTTPS auf die Firewall erlaubt. Was nun passiert, erscheint völlig korrekt: die von mir erstellte Regel ist wirkungslos, weil vorher die "Default deny rule" greift. Da stellen sich mir ein paar Fragen:
1. Nun diese anscheinend grundlegende Floating Rule zu entfernen damit "meine" Regel wirkt erscheint mir... dumm?
2. Es ist doch bestimmt sinnvoll die Regel unter Rules:WAN anzulegen, schliesslich soll sie nur dort gelten, nur wie sorge ich dafür dass sie auch angewendet wird?

Ich habe jetzt eine Weile rumgesucht, aber scheinbar brauche ich jemanden der mir das wie einem Fünfjährigen erklärt  :-[

Ich verwende die OPNsense 20.7.3

Danke schonmal!

14
German - Deutsch / Re: Welcher Durchsatz ist mit einem Celeron N3450 realistisch?
« on: March 03, 2020, 08:15:01 pm »
So, ich nochmal  8)

OPNSense läuft jetzt direkt auf der Hardware. Ich habe stundenlang getestet, bin jedoch nicht über die Raten hinausgekommen die ich mit Proxmox erreicht habe. IDS an oder aus - kein Unterschied. Diverse Male mit unterschiedlichen Einstellungen (CSO, TSO; LRO, ...); durchgestartet - nix.

Zuletzt habe ich powerd aktiviert und die Interfaces statt auf Autoselect auf 1000baseT Full-Duplex gesetzt.

Und plötzlich rennt das Ding, ich bekomme ohne weitere >850MBit. Mit aktiviertem suricata, welches dabei auf max. ~150% CPU geht.

Wahrscheinlich kann ich noch ein wenig mehr rausholen, aber das ist erstmal ein ordentliches Ergebnis.

15
German - Deutsch / Re: Welcher Durchsatz ist mit einem Celeron N3450 realistisch?
« on: March 03, 2020, 04:02:16 pm »
Quote from: ascii on February 28, 2020, 07:43:30 am
kommt den das 1Gbit auch wirklich an?
Du kannst ja mal versuchen einen Rechner direkt an das WAN zu hängen und iperf laufen lassen.
ggf. auch mal bei iperf mit -P x oder -R laufen lassen
-P x , wobei x die zahl der paralellen tests ist
-R dann sendet der an dich und nicht du zum server

Ja das ist auch komisch. Weder direkt auf der OPNSense Box (iperf3 via shell) noch von einem dicken Rechner dahinter (genauso) komme ich auf bessere Werte. Und das auch wenn IDS etc deaktiviert sind. Auch die CPU der OPNSense Box macht in dem Moment keine Mucken, geht kaum über 20% Last. Habe nun alle möglichen freien iperf3 Server probiert.

Pages: [1] 2 3
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2