Project

General

Profile

Actions

action #54860

closed

Firewall: NAT Rules for inbound Routing via VPN are missing.

Added by flacco almost 5 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2019-07-30
Due date:
2020-06-01
% Done:

100%

Estimated time:

Description

It seems to be impossible to reach hosts inside the internal net via OpenVPN Connections.

To set them manually the following commands are necessary:

firewall-cmd --direct --permanent --add-rule ipv4 nat POSTROUTING 0 -o intern -j MASQUERADE
firewall-cmd --direct --permanent --add-rule ipv4 filter FORWARD 0 -i vpn -o intern -j ACCEPT
firewall-cmd --direct --permanent --add-rule ipv4 filter FORWARD 0 -i intern -o vpn -m state --state RELATED,ESTABLISHED -j ACCEPT

Untestet yet.


Files

direct.xml (384 Bytes) direct.xml EDV_Lotse, 2019-07-30 14:12

Related issues 1 (0 open1 closed)

Related to invisAD-setup - action #104730: "Direct Rules" der Firewall greifen nicht mehr.Closedflacco2022-01-092022-01-31

Actions
Actions #1

Updated by EDV_Lotse almost 5 years ago

Ich habe gerade getestet: es funktioniert.
Die Befehle haben eine Datei /etc/firewalld/direct.xml erzeugt.
Kann man das Gleiche über Konfigurationsdateien erreichen?

Actions #2

Updated by flacco almost 5 years ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 20

Das war der Plan. Kannst Du die Datei mal hier ans Ticket anhängen?

Actions #3

Updated by EDV_Lotse almost 5 years ago

  • File direct.xml direct.xml added
  • Status changed from In Progress to Workable
  • % Done changed from 20 to 0
Actions #4

Updated by flacco almost 5 years ago

  • Status changed from Workable to In Progress
  • % Done changed from 0 to 20
Actions #5

Updated by flacco almost 5 years ago

  • Status changed from In Progress to Feedback

Ja, die Datei können wir einfach ins Setup integrieren. Ich bin nur am überlegen, ob wir das pauschal im sine2 Modul firewall machen oder im Modul openvpn. Früher war openvpn mal ein optionales Modul, es hätte also Sinn gemacht, die Firewall Erweiterung nur dann einzurichten, wenn openVPN au genutzt wird.

Aktuell ist openvpn nicht optional, also wäre der erste Weg auch ok.

Was denkt Ihr?

Actions #6

Updated by ingogoeppert almost 5 years ago

vpn steht in der Liste der internen Devices. Mir ist nicht klar warum man da überhaupt extra Regeln dafür braucht. Sollte zwischen den internen nicht eh alles erlaubt sein? Woher kommen die Befehle?

Actions #7

Updated by flacco almost 5 years ago

  • % Done changed from 20 to 30

Das hatten wir im alten SUSEfirewall2 Setup auch drin, nannte sich "Classrouting", also NAT zwischen zwei internen Devices.

Die Befehle hab ich mit Googles Hilfe gefunden. Ich hatte das gleiche Problem wie Dimitri allerdings nicht auf einem invis-Server.

Actions #8

Updated by ingogoeppert over 4 years ago

  • Target version changed from 14.1 to 14.2
Actions #9

Updated by flacco over 4 years ago

Ich habe mal die alten Konfigurationen aus unserem SuSEfirewall2 Setup herausgesucht:

-> Wir haben die VPN-Netzwerkschnittstelle der internen Zone zugeordnet:
FW_DEV_INT="intern vpn"

-> Wir haben für das VPN-Netz Masquerading aktiviert
FW_MASQ_NETS="192.168.166.0/24"

-> Wir hatten Classrouting für die interne Zone aktiviert:
FW_ALLOW_CLASS_ROUTING="int"

Das dürfte in etwa auf das heraus laufen, was ich mit den oben genannten zusätzlichen Regeln für den firewalld erreiche.

Actions #10

Updated by flacco almost 4 years ago

  • Due date set to 2020-06-01
Actions #11

Updated by flacco almost 4 years ago

Wir sollten mal mit folgenden Regeln testen:

<?xml version="1.0" encoding="utf-8"?>
<direct>
<rule ipv="ipv4" table="filter" chain="FORWARD" priority="0">-i vpn -o intern -j ACCEPT</rule>
<rule ipv="ipv4" table="filter" chain="FORWARD" priority="0">-i intern -o vpn -j ACCEPT</rule>
</direct>

Mit dem ersten Satz könnte es Probleme NFS-Zugriffen geben.

Actions #12

Updated by flacco almost 4 years ago

  • % Done changed from 30 to 40
Actions #13

Updated by flacco almost 4 years ago

  • % Done changed from 40 to 60

direct.xml added to invis-setup

Actions #14

Updated by flacco almost 4 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 60 to 100

testet!

Done

Actions #15

Updated by flacco over 2 years ago

  • Related to action #104730: "Direct Rules" der Firewall greifen nicht mehr. added
Actions

Also available in: Atom PDF