Score:0

NATing Traffic Through VPN Tunnel

ug flag

I have a Fedora 36 server setup running as a gateway. It forwards packets to a further gateway down the line, which works well. I have taken out a subscription to NordVPN, and have used OpenVPN on the server to connect. The connection works, and tun0 is created.

When I start the VPN tunnel on the server, clients lost connectivity to the outside world. When I stop the VPN tunnel, connectivity is restored. Routing tables on the server (route -n) seem to look okay.

How can I set up the server to route traffic bound for the outside world through the VPN tunnel when it starts? I'm very confused as every tutorial that suggests NAT-ing traffic through the tunnel fails.

When I ping from one of the clients on my local network, this is what I see.

92 bytes from server 192.168.1.3: Communication prohibited by filter
Vr HL TOS  Len   ID Flg  off TTL Pro  cks      Src      Dst
 4  5  00 5400 df62   0 0000  3f  01 ca7a 192.168.1.20  8.8.8.8 

Where the server is at 192.168.1.3, and the client is set up at 192.168.1.20.

For additional information:

  • The VPN is using TCP on port 443
  • The ethernet adapter on the server is ens34
  • The VPN is connected through tun0 on the server
  • The local network is 192.168.1.0/24

I can also verify that traffic originating from the server is directed through the VPN. When I do a "what is my IP" check to the outside world, the IP is different from the ISP assigned to me to my ISP. When I stop the VPN, the IP switches back to the ISP assigned address as expected.

Any help is appreciated.

us flag
What are the server's firewall rules when VPN is running and when it is switched off?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.