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

#1
Hallo,

Was soll daran kompliziert sein?

1) Der Proxmox ist Transparent und wird durch den Bridge nicht bekannt, es entfallen deutlich kompliziertere schritte...
2) Die Bridge-Anleitung kommt von Hetzner und funktioniert tadellos (Nur nicht dahinter)
3) Ich habe für Virtualisierungszwecke eine separate bezahlte IP-Adresse nur für den Bridge Modus, die Netzwerkkarte der opnSense hat genau die von Hetzner zugeordnete MAC-Adresse (Nein, stimmt die MAC nicht, geht auch kein IPv6 Subnetz im Bridge-Modus) funzt auch alles wunderbar, auch die IPs aus den IPv4 Subnetzen sind in den VMs über die zusätzlichen Subnets erreichbar.

Letztlich geht alles an Traffic IPv4+IPv6 erstmal an die OpnSense, vergebe ich in der opnSense Virtuelle IPv6 Adressen, sind diese auch extern anpingbar, sofern ich das möchte und so viele ich möchte.

Das Problem scheint an der OpnSense zu liegen, dass diese mit dem Routing irgendwie nicht klar kommt, denn ich müsste trotzdem aus der VM doch trotzdem das GW der OpnSense anpingen können und eine antwort bekommen?

Ich habe mal von der VM-Maschine Google angepingt:





Auf dem Letzten Screenshot sieht man das der Ping von der Virtuellen Maschine an der OpnSense (LAN) ankommt, aber irgendwo stecken bleibt...
Die Selben Logs bekomme ich auch wenn ich das GW (2a01:XXXX:XXXX:XXXX:1000::1) anpinge..

[Edit] Erledigt, funktioniert genau so wie gewollt. Ergo, nichts "kompliziert".
#2
Moin Zusammen,

Bin hier etwas am grübeln und habe ein Problem:

Ich habe einen Hardware Server mit einem IPv4 Netzwerk und eine IPv6 /64 Subnetz von Hetzner.
Von Hetzner habe ich eine Virtualisierungs-IP Adresse mit MAC Adresse erhalten, das IPv6 Subnetzwerk zeigt auch auf diese IP-Adresse.


Proxmox-Konfiguration:

vmbr0 auf dem Proxmox:
IPv4: 65.xx.xx.xx/26, GW: 65.xx.xx.1
IPv6: 2a01:XXXX:XXXX:XXXX::2/64, GW: fe80::1 (Extern erreichbar)
vmbr1 (ist meine normale interne karte und hat keine IPs bekommen)

vmbr0 ist auf der opnSense (net0 - WAN)
vmbr1 ist auf der opnSense (net1 - LAN)

net0 ipv4: XX.XX.XX.100/24 Öffentliche-IP von Hetzner (läuft)
net0 ipv6: 2a01:XXXX:XXXX:XXXX::1 /64, GW: fe80::1, Subnetz Hetzner läuft auch.

net1 ipv4: 172.16.10.1/24 (Nur internes Netzwerk zwischen den VMs)
net1 ipv6: 2a01:XXXX:XXXX:XXXX:1000::1, IPv6 Gateway Rules disabled (Läuft und ist von extern Pingbar)

Nun habe ich weitere VMs die ich nur über IPv6 erreichen möchte, somit habe ich eine neue Linux CT angelegt:

net0, eth0, vmbr1 (172.16.10.10/24, ipv6: 2a01:XXXX:XXXX:XXXX:1000::10/64, GW: 2a01:XXXX:XXXX:XXXX:1000::1)

Nun habe ich aber das Problem, ich kann von der Virtuellen Maschine das Gateway nicht anpingen, aber auch von extern ist die Kiste nicht erreichbar.

Was fehlt mir noch, bzw. warum läuft das nicht?

vielen lieben Dank,
Daniel
#3
Quote from: iMx on August 10, 2023, 08:07:32 PM
You keep saying 'random' - but it's really not random at all. 

The firewall only sees part of the connection, so it drops it.   With Keep state enabled, it needs to see all of the connection.

The other potential option, is that you've got packet loss/drops/weirdness somewhere with your Proxmox/USB NIC setup - opnsense is reacting to what it sees, or doesn't see as the case may be.

Yes random, with my ping test, and block the ping on the VLAN15, there is a packet loss of 100%...  :o

On Proxmox side, i changed the interface for the network cards from virtio to realtek and e1000, without success.
I found a article for this problem and activated 'Bypass firewall rules for traffic on the same interface', without success...

But then i was suprised, i started "tracert 172.16.1.5" from my Laptop in VLAN15....
And the Only Route to 172.16.1.5 is directly "172.16.1.1", but the network card has the gateway "172.16.15.1".

doesn't my trace have to go the route "172.16.15.36 -> 172.16.15.1 -> 172.16.1.1" ?


#4
Quote from: iMx on August 10, 2023, 05:09:21 PM
Quote from: Sany on August 10, 2023, 05:01:39 PM
Thank you, the hack worked, but how can i resolv a Asymmetric routing?

My OpnSense are running on a Proxmox Server, there has 3x USB 3.0 Network Cards.
The network cards are connected to the Proxmox Server, and created as virtual "network cards" to the virtual machine with VLAN Aware.

Sounds horrendous ;D

I suspect one of the following is happening:

- The previously 'seen' source and destination is not the same both ways, for example:

a.a.a.a -> b.b.b.b but the reply is c.c.c.c -> a.a.a.a, or b.b.b.b -> d.d.d.d

- You have multiple routes/paths to the destination, not all via the firewall, so the devices can bypass the firewall for the initial 'SYN', so when it only sees tcp flags that should occur later in the connection they're dropped as out of state.

By turning off keep state you're telling the firewall to ignore the various sequences that should occur.  Which is generally not a good thing to do, sometimes necessary but can nearly always be avoided.

No i don't have multiple routes to the destination, i have a VLAN15 interface to the 172.16.15.x VLAN with one Route and that is the route from the opnsense.

i tested the VLAN15 to local lan, the VLAN15 rules are empty, when i have multiple routes to the destination that bypasses the firewall, the ping should randomly pass or blocked from the firewall and other way "pass".

But there is nothing after 1500 pings, all are blocked and not bypassed...
#5
Thank you, the hack worked, but how can i resolv a Asymmetric routing?

My OpnSense are running on a Proxmox Server, there has 3x USB 3.0 Network Cards.
The network cards are connected to the Proxmox Server, and created as virtual "network cards" to the virtual machine with VLAN Aware.
#6
Thank you, but why my packets randomly blocked and passed ?
#7
Here.. the TCP flags between pass and block are different....
#8
Hello,

my opnSense is on a Proxmox Server, the Clients are ESP32..
#9
Hello,

I have a Interface called "VLAN15 (172.16.15.0)" and i have a MQTT Server on a other Subnet (172.16.1.5) i will only allow the MQTT Port, but it's not working.....

Crazy thing, my packets are blocked and pass, but the firewall ignores my rules on VLAN15...

what is todo?
#10
German - Deutsch / IPSec mit Fritz!Box und OpnSense
August 10, 2023, 09:06:15 AM
Moin Zusammen,

Ich habe eine Fritz!Box 6820v3 LTE mit einem Geschäftskundentarif und habe entsprechend eine öffentlich erreichbare IPv4 an der Fritz!Box.

Meine Konstellation:

Fritz!Box LTE (Intern 172.16.9.1/24) (IP: 1.1.1.1) -----> OpnSense im RZ (IP: 2.2.2.2) -> Internes Netz (172.16.1.0/24, GW: 172.16.1.1)

So, der Verbindungsaufbau IPSec war nicht das Problem, das Problem ist nur, das vermeintlich nichts durch das Tunnel geht.
Ich kann aus dem Netz der Fritz!Box das GW 172.16.1.1 nicht anpingen. (Habe auch schon auf Windows "route add 172.16.1.0 mask 255.255.255.0 172.16.1.1") gemacht, ohne erfolg.

Aus dem Netz der OpnSense (172.16.1.0/24) kann das das GW 172.16.9.1 auch nicht pingen, der Ping geht aber durch die Firewall durch und wird auch als ICMP (Grün) im Firewall Log angezeigt und der Zähler Bytes Out addiert sich...

Phase 1 und 2 sind completed, es steht auch bei Phase 2 "INSTALLED" der Zähler Bytes Out zählt auch den Ping, aber der Zähler Bytes IN bleibt hartnäckig auf 0....

Eine Rule von Source IPSec ins interne LAN habe ich erstellt...

Hier mal meine Fritz!Box Konfig:


vpncfg {
connections {
  enabled = yes;
  editable= yes;
  use_ikev2 = no;
  conn_type = conntype_lan;
  name = "VPN";
  always_renew = yes;
  reject_not_encrypted = no;
  dont_filter_netbios = yes;
  localip = 2.2.2.2;
  local_virtualip = 0.0.0.0;
  remoteip = 1.1.1.1;
  remote_virtualip = 0.0.0.0;
  localid {
    fqdn = "SECRET";
    }
  remoteid {
   fqdn = "SECRET";
    }
  mode = phase1_mode_aggressive;
  phase1ss = "all/all/all";
  keytype = connkeytype_pre_shared;
  key = "SECRET";
  cert_do_server_auth = no;
  use_nat_t = yes;
  use_xauth = no;
  use_cfgmode = no;
  phase2localid {
    ipnet {
      ipaddr = 172.16.9.0;
      mask = 255.255.255.0;
      }
    }
  phase2remoteid {
    ipnet {
      ipaddr = 172.16.1.0;
      mask = 255.255.255.0;
      }
    }
  phase2ss = "esp-aes256-3des-sha/ah-all-sha/comp-lzs-no/pfs";
  accesslist = "permit ip any mask 255.255.255.0 172.16.1.0 255.255.255.0";
  }
  ike_forward_rules = "udp 0.0.0.0:500 0.0.0.0:500",
                      "udp 0.0.0.0:4500 0.0.0.0:4500";
}


Hat jemand eine Idee?! :)
#11
Hello,

I have a local network (172.16.10.0/24) and a VLAN8 Network (172.16.8.0/24)
i want to block all traffic to the local LAN, that works fine,
i want to allow traffic vom VLAN8 to public, that works, (it brings the problem, access on all vlans :-( )

but i want to pass traffic to a specific device on the lan network side (MySQL Server, ICMP)

my client can't ping to the localnetwork, fine.
my client can ping to google ( 8.8.8.8 ) fine.

but my client can't ping to the specific device in the LAN..

why my rule not working?

#12
German - Deutsch / VLAN Kommunikation
June 10, 2023, 09:36:14 AM
Hallo Zusammen,

Habe ein ziemliches Problem, oder vielleicht denke ich auch falsch...
Ich habe einen Proxmox Server mit einer Netzwerkkarte, hier liegt die öffentliche IPv4 meines Providers.
Dann habe ich lediglich noch 2 Linux Bridges eingerichtet für LAN und VLANs.

vmbr0 -> WAN / vtnet0
vmbr1-> LAN/ vtnet1 (172.16.1.0/24)
vmbr2 -> VLANs vtnet2 (172.16.2.0/24)

auf dem vmbr2 habe ich in opnsense das VLAN5 eingerichtet (172.16.5.0/24)

Nun habe ich eine Linux Debian VM mit vmbr2:
VLAN Tag 5 und (172.16.5.2)
VLAN Tag 8 mit (172.16.8.2)

Ohne entsprechende Rule komme ich natürlich nicht ins öffentliche Netzwerk...

Deshalb folgende Rule:
https://img.onl/jTjvUC
IPv4, VLAN8, * * * * *

Nun kann aber das VLAN8 mit allen Subnetzen und VLANs kommunizieren (Merkwürdig, mit den IPSec Tunnels jedoch nicht!)

Müsste es nicht so sein, das automatisch der Traffic zwischen den Netzwerken geblockt wird?
Oder wie müsste ich meine VLAN Rules anpassen? Wenn ich als Destination WAN net wähle, geht leider gar nichts raus..

Gibts denn eine ultimative Rule um generell den Verkehr zwischen den Netzwerken untereinander zu unterbinden?
Bei Sophos war das irgendwie einfacher, bzw. musste man die Netzwerke explizit zur Kommunikation freigeben...

vielen lieben Dank,
#13
German - Deutsch / Re: IPv6 Gateway Problem...
May 26, 2023, 05:02:25 PM
Hallo,

Hat mein Problem nicht gelöst, wenn ich ipv6 für das WAN auf Track Interface stelle,
erhält die opnsense keine IPV6 von der Fritzbox...

Und Vodafone stellt mit in der Tat ein /64 zur Verfügung... so stehst im IPv6 Präfix..
#14
German - Deutsch / IPv6 Gateway Problem...
May 21, 2023, 03:05:19 PM
Moin Zusammen,

Bin relativ neu im Thema OPNsense, nutze normal nur Sophos XG.

Ich habe folgendes Setup:

1. Fritz!Box Cable (192.168.178.x/24)  -> opnSense (172.16.1.254/24) -> Rechnernetzwerk (172.16.1.x/24) -> Rechner 1 (172.16.1.50)

Nun ist in der FritzBox IPv6 inkl. RA aktiviert, die opnSense erhält am WAN interface auch eine IP-Adresse, das WAN Interface ist Konfiguriert mit (DHCPv6)

Nun kann ich von der opnSense IPv6 Adressen anpingen, aber aus meinem Rechner Netzwerk nicht.
Ich kann vom Rechnernetzwerk alle internen IPv6 anpingen, inkl. das Standard GW (Das ich übrigends nirgends setze!)

Die Rules habe ich auch schon angepasst, irgendwie ist der Wurm drin..
habe mal ein paar bilder hochgeladen, vielleicht kann mir jemand helfen? :)