Routing with VPN

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Flocki1982

Routing with VPN

Post by Flocki1982 »

Hello together,

I'm using my router at home as a VPN server when on travel. The server in my home network is running on 192.168.0.1/255.255.255.0 as private IP. I can create a tunnel using vpnc that creates device tun0

Code: Select all

tun0      Link encap:UNSPEC  Hardware Adresse 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet Adresse:192.168.0.101  P-z-P:192.168.0.101  Maske:255.255.255.255
          inet6-Adresse: fe80::2026:92a5:ad52:4b4f/64 Gültigkeitsbereich:Verbindung
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1412  Metrik:1
          RX-Pakete:12960 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:11807 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:500 
          RX-Bytes:10163744 (10.1 MB)  TX-Bytes:1374957 (1.3 MB)

wlp2s0    Link encap:Ethernet  Hardware Adresse c0:18:85:74:46:78  
          inet Adresse:192.168.0.164  Bcast:192.168.0.255  Maske:255.255.255.0
          inet6-Adresse: fe80::2d91:eae1:55fe:7735/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
          RX-Pakete:93109 Fehler:0 Verloren:0 Überläufe:0 Fenster:0
          TX-Pakete:56157 Fehler:0 Verloren:0 Überläufe:0 Träger:0
          Kollisionen:0 Sendewarteschlangenlänge:1000 
          RX-Bytes:107257045 (107.2 MB)  TX-Bytes:8232628 (8.2 MB)
Unluckily the IP-Adresses assigned by the wifi gateway by DHCP is identical with my tun0 device. Currently the routing table looks like this:

Code: Select all

default dev tun0  scope link 
default via 192.168.0.1 dev wlp2s0  proto static  metric 600 
84.148.47.196 via 192.168.0.1 dev wlp2s0  src 192.168.0.164 
169.254.0.0/16 dev wlp2s0  scope link  metric 1000 
192.168.0.0/24 dev wlp2s0  proto kernel  scope link  src 192.168.0.164  metric 600 
But i can't access my home server by it's name or ip. When using my android device I can connect, so there has to be a solution. Does anyone have an idea, how I have to configure the routing to get this setup running?

Final target is to use my notebook as a VPN-tunneled hotspot avoiding the local wifi with my other devices...

Regards
Florian
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Locked

Return to “Networking”