[Firewall] Unwanted NAT on OpenVPN connection

Sebastian Suchanek sebastian.suchanek at gmx.de
Thu Oct 13 20:09:36 CEST 2016

Am 12.10.2016 um 22:26 schrieb Lonnie Abelbeck:

Hi Lonnie,

first of all, thank you for your reply!

>> INT_IF="eth0 tun0"
> I'm a little puzzled why you have three subnets off two interfaces, how is attached to the interfaces ?

- is the LAN physically connected to the server.

- is the internal transfer net of the OpenVPN system.
  (In case you're not familiar with OpenVPN: it uses an internal
  transfer net with its own IP range to route traffic from one VPN peer
  to another. Usually, this is transparent to the routed traffic.)

- is a LAN a second location which is connected via an
  OpenVPN connection. So far, this is the only remote LAN, but more
  might follow in the future.

But inspired by your question, I've just changed my configuration to

| [...]
| [...]

It seems that the NAT'ing of accesses from the remote LAN to
the local LAN is gone now, but so far I'm not yet sure for
the opposite direction. Hopefully I can test this in more depth during
the upcoming weekend...

> If the OpenVPN traffic is directly routed to the LAN, you should not see any NAT'ing.

Yes, it is:

| # ip route
| default dev ppp0  scope link
| dev eth0  proto kernel  scope link  src
| via dev tun0
| via dev tun0
| dev tun0  proto kernel  scope link  src
| dev ppp0  proto kernel  scope link  src
| #

> A traceroute from LAN(eth0) to LAN(tun0) and reverse may be useful.

No problem - accessing a host in local LAN from the remote LAN:

| # traceroute
| traceroute to (, 30 hops max, 60 byte packets
|  1 (  31.123 ms  40.863 ms  40.609 ms
|  2 (  39.872 ms  38.872 ms  38.194 ms
| #

And vice versa:

| # traceroute
| traceroute to (, 30 hops max, 60 byte packets
|  1 (  33.087 ms  34.516 ms  35.437 ms
|  2 (  38.277 ms  39.985 ms  43.189 ms
| #

> Also, suggestion ...
>> TRUSTED_IF="eth0 tun0"
> Instead I would use:
> --
> IF_TRUSTS="eth0 tun0"
> --
> This should not be a functional change for your case, but should you
> add additional interfaces, additional OpenVPN tunnels, VLAN's or such
> the IF_TRUSTS variable is a better (more precise) choice.

Thanks for the hint, I'll keep that in mind.

Best regards


More information about the Firewall mailing list