www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

LAN-to-LAN VPN routing

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> Linux and Networking
View previous topic :: View next topic  
Author Message
Uksindus



Joined: 10 Mar 2017
Posts: 4

PostPosted: Mon Mar 13, 2017 10:28 pm    Post subject: LAN-to-LAN VPN routing Reply with quote

I'm baffled what kind of routing rule I need to route traffic from my local LAN -> ZS box -> VPN tunnel. Everything works fine without the VPN,

My WAN is a 4G modem via pppoe, ETH00 has NAT and DHCP enabled. (All computers on LAN have internet connectivity now, DHCP default gateway = ZS box local address). If I fire up the VPN (commercial service provider), it connects just fine and ZS box has connectivity via VPN (tracepath confirmed).

When VPN is up, all LAN computers lose connectivity to internet (connection to ZS box stays up).

VPN00 has these options and interface VPN00 has NAT enabled:
Code:
--dev tun0 --dev-type tun --topology subnet --pull --config /Database/serviceproviderfile.ovpn --auth-user-pass /Database/passwordfile --redirect-gateway


Please help, what I'm missing here?
Back to top
View user's profile Send private message
Uksindus



Joined: 10 Mar 2017
Posts: 4

PostPosted: Tue Mar 14, 2017 6:22 am    Post subject: Reply with quote

Success:

Postrouting chain for VPN00 had no packets going in or out => tun00 interface had no NAT, and it's not listed in NAT enabled interfaces.

If adding manually
Code:
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
routing from ETH00 -> VPN00 works.

Based on that, I found this thread which deals with the same thing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> Linux and Networking All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group