OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of andre2000 »
  • Show Posts »
  • Topics
  • 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

Topics - andre2000

Pages: [1]
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 / 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?

3
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!

4
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!

5
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!


6
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!

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

8
German - Deutsch / Welcher Durchsatz ist mit einem Celeron N3450 realistisch?
« on: February 27, 2020, 03:33:24 pm »
Hallo zusammen,

ich habe seit kurzem einen 1Gigabit-Anschluss, bekomme jedoch max. 450 MBit aus der Leitung mit iperf3.

Jetzt bin ich am überlegen ob der N3450 meines Zotac CI327 der Flaschenhals ist, denn iperf lastet bei dieser Geschwindigkeit die CPU aus. Allerdings komme ich auch dann wenn ich es von einer anderen Maschine aus probiere nicht höher, und dann wird die CPU kaum belastet.

OPNSense 20.1, in Proxmox. WAN Adapter physisch (nicht virtualisiert). Traffic shaping und IDS/IPS, proxy, clamav etc. sind deaktiviert, Rttd unter Last selten nie über 20ms. CPU ist als "host" konfiguriert, die Kiste hat 4GB RAM. Auf dem VM Host läuft sonst nix. Hardware offloading etc sind deaktiviert.

Würde mich über eure Erfahrungen freuen.

9
20.1 Legacy Series / solved - [IPSec] How to set up Roadwarrior with "dynamic" mobile access
« on: February 14, 2020, 12:32:13 pm »
Hi all,

I've tried several tutorials to get IPSec up and running, with different outcomes of failure  ;D . I am also using OpenVPN, but would like to improve the way I am using VPN. Basically, I want my homelab services (home automation, bitwarden to name the most important) to be accessible "on demand" without having to connect manually. Or in other words, as soon as I am connecting to something that ends with ".home" which is my local domain, this specific traffic should go through an IPSec tunnel. I think there is a name for this, but I am not sure. As far as I know this is not possible with openVPN, but I'd be happy to learn better.

The problem for me with most of the tutorials is that they are describing older versions of OPNsense, which have sometimes different options to set. And because I am not getting further, I have no idea if the "on demand" needs a specific setup or would be there by default.

I am be very thankful for any hints, general explaination or suggestions for tutorials you were successful with.

thanks in advance!

10
19.7 Legacy Series / OpenVPN connection fails (TLS handshake failed)
« on: January 19, 2020, 12:31:05 pm »
Hi,

I have been using openVPN for a long time without any issues. However, since about two weeks, I cannot connect to openVPN anymore (using iOS 13 devices or the viscosity client on the Mac).

Today I took a look and am seeing the following error:

Jan 19 11:49:44   openvpn[18369]: 192.168.11.29:58298 TLS Error: TLS handshake failed
Jan 19 11:49:44   openvpn[18369]: 192.168.11.29:58298 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Jan 19 11:49:44   openvpn[18369]: 192.168.11.29:51732 TLS Error: incoming packet authentication failed from [AF_INET6]::ffff:192.168.11.29:51732
Jan 19 11:49:44   openvpn[18369]: 192.168.11.29:51732 Authenticate/Decrypt packet error: bad packet ID (may be a replay): [ #1 / time = (1579430974) Sun Jan 19 11:49:34 2020 ] -- see the man page entry for --no-replay and --replay-window for more info or silence this warning with --mute-replay-warnings


(I am aware that this is from an internal IP, it's the same from outside)

I did't make any changes to the system beside the regular updates.

Do you have an idea why this could happen? Would there be a reason to be paranoid about this? I will go ahead and reinstall OPNsense, but want to ensure I am not just cureing some symptoms away.

Please let me know if I shall provide further log files.

Thanks in advance!
Andre

11
German - Deutsch / /var und /tmp Größen ändern sich ständig
« on: August 27, 2019, 09:55:05 pm »
Hallo zusammen,

ich logge den Status meiner OPNsense Firewall mit SNMP (Observium).

Dabei habe ich festgestellt dass sich die Größe von /var und /tmp alle paar Minuten ändert, was zu jeder Menge Infos / Warnungen führt. Kann ich die Größe irgendwie "fixieren", und spricht etwas dagegen das zu tun?

Danke & Grüße

12
German - Deutsch / Realtek Treiber oder VirtIO für WAN Interface
« on: November 25, 2018, 01:04:48 pm »
Hallo zusammen,

ich betreibe OPNSense in Proxmox. Der Host verwendet Realtek RTL 8169 NIC. Die Performance dieser Karten war unter Linux bislang grottig (geringer Durchsatz, hohe Systemauslastung), seit September gibt es von Realtek jedoch einen Treiber der vernünftig funktioniert. Proxmox basiert ja auf Debian, und nachdem ich den Treiber dort installiert habe ist die Performance von VirtIO Netzwerk Adaptern in allen VMs einwandfrei.

Für Opnsense habe ich nun für LAN einen VirtIO Adapter erstellt, ich möchte aber ungern WAN mit VirtIO nutzen, deshalb habe ich den anderen Netzwerkadapter per PCI-passthrough direkt an die OPNsense VM gebunden. Aber auch hier ist die Perfomance schlecht, und von meiner 400MBit Leitung kann ich selten mehr als 180 nutzen. Als ich beide NIC per passthrough in OPNSense hatte war die Performance noch schlechter.

Ich sehe jetzt zwei Möglichkeiten:

1. (wie) kann ich nun den Treiber in OPNSense installieren? Ich habe leider kaum Ahnung von FreeBSD.

2. den WAN NIC als VirtIO Gerät von Proxmox einbinden. Aber dann exponiere ich Proxmox auf dem WAN Interface und das Risiko kann ich nicht einschätzen.

Danke für eure Hilfe!

Pages: [1]
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