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

#1
Hallo zusammen,

ich würde gerne von einem internen Gerät mit interner IPv4-Addresse auf einen "lokalen" Webservice zugreifen, jedoch soll beim Webservice als Absender nicht die interne IPv4-Addresse des Gerätes ankommen sondern die publik IPv4 des WAN interfaces der OPNsense. Die OPNsense hat auf dem WAN interface direkt eine publik IPv4 hinterlegt.
Die OPNsense hat auf dem WAN interface zwei zusätzliche publik IP-Addressen als VIP konfiguriert.
Für eine dieser VIPs ist ein Port Forward konfiguriert, der Port Forward zeigt auf einen Reverse Proxy (und dieser danach auf den Webservice).

Der Zugriff auf den Webservice funktioniert grundsätzlich von einer publik IPv4-Addresse (Internet).
Bisher funktioniert der Zugriff nicht, wenn ein internes Gerät den Webservice unter der Publik IPv4-Addresse erreichen möchte.

Ich habe schon verschiedene NAT Einstellungen ausprobiert, wie z.B. ein Outbound NAT für interne Geräte mit dem Ziel des Webservices (VIP und Reverse Proxy IP) oder NAT reflection eingeschaltet, aber leider ohne erfolg. Bei einer Analyse durch Live View logs konnte ich keinen Block von Traffic erkennen. ( Gibt es vielleicht weitere Analyse Tools die ich verwenden könnte?)

Ich weiss nicht, ob NAT der einzige und oder richtige Ansatz ist, allerdings fällt mir leider nichts mehr ein was ich sonst noch ausprobieren könnte. Falls ihr mich in eine Richtung weisen könntet oder sonstige Tipps habt, bin ich dankbar um jeden Hinweis.

Kann es vielleicht damit zusammen hangen, das auf die publik Webservice IPv4-Addresse ein Port Forward eingerichtet ist, und der Port Forward nicht ausgeführt wird, wenn für diese IPv4-Addresse zuvor ein Outbound NAT gemacht wurde?
Oder dass diese WAN IP und die Webservice IP eigentlich am gleichen interface hängen und die OPNsense deswegen kein NAT macht?


P.S.: Ein Split DNS ist leider keine Lösung, weil die internen Geräte teilweise eine VPN-Verbindung aufbauen müssen und daher die DNS Einstellungen überschrieben werden. (Dies sind Geräte von Kunden auf denen ich keine Administratorenrechte habe.) Daher wird das Gerät nur die publik IPv4-Addresse kennen.

Danke fürs lesen.

Gruß,
Vincent
#2
Maybe it's easier to understand what I mean, if I'll explain the scenario. Given is the following network.


      WAN / Internet
(Public IPv4 Range routed to this WAN  IP)
            :
            :
            :
      .-----+-----.
      |  Gateway  | 
      '-----+-----'
            |
        WAN |
            |
      .-----+------. DMZ-EXT       
      |            +-------------------------.
      |  OPNsense  | 172.16.2.1/28           | 172.16.2.2
      |            |                 .-------+-------.
      |            |                 | Reverse Proxy |
      |            |                 '-------+-------'
      |            | DMZ-INT                 | 172.16.1.2
      |            +-------------------------'
      |            | 172.16.1.1/28
      |            |
      |            |
      |            |  LAN-SERVERS    .---------------.
      |            +-----------------+ Web Server    | 10.0.4.2
      |            |  10.0.4.1/24    '---------------'
      '-----+------'
            |
        LAN | 10.0.3.1/24
    CLIENTS |
      .-----+------.
      | LAN-Switch |
      '-----+------'
            |
    ...-----+------...


For the routed public IP addresses that points to the reverse proxy, a port forwarding will beconfigured on OPNsense. The webserver traffic reaches at first the reverse proxy. The reverse proxy is configured that packets addressed to public IP's go only over DMZ-EXT network to internet and packets addressed to CIDR range go only over DMZ-INT network.

Users need to acces Web Servers from public (Internet) and from internal network LAN Clients. Accessing directly the webserver is not an option. Only public DNS resolvers are used on the users computer, this means an user located at LAN Client network needs to have the ability to connect to one of the routed public IP addresses.

To achieve this, a Full NAT is needed. The config on the actual system (sophos) looks something like this:
All traffic that applies to source "LAN client network" with destination "public IP of reverse proxy" needs to change the source to "WAN IP" and needs to change the destination to "DMZ-EXT IP Reverse Proxy".


Is something like this possible to configure in OPNsense?
At least I did not get any configuration to work like this.
#3
Thanks for your quick reply phoenix. Please do not confuse a Full NAT to a 1:1 NAT. Those are different things.

1:1 NAT (whole networks): Maps IP addresses of a network to another network one-to-one. The rule applies either for the source or for the destination address of the defined IP packets.

Full NAT (source + destination): Maps both the source address and the destination address of defined IP packets to one new source and one new destination address. The source service and the target service can be changed, too.
#4
Hello OPNsense guys!

I want to switch to OPNsense, so I setup an OPNsense firewall. Looks very promising!
In any case, I test whether OPNsense covers all functions that I want to use.
I couldn't find informations in the configuration nor in the documentation about Full cone NAT.

Can OPNsense do Full cone NAT? https://en.wikipedia.org/wiki/Network_address_translation#Methods_of_translation