0

I wanted to play age of mithology the last week with my recently configured Vpn service . But I had some ingame connection issues, after too many attempts I was able to solve it. There are 2 default gateways as you can see here

netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
default         10.8.0.9        0.0.0.0         UG        0 0          0 tun0
default         192.168.0.1     0.0.0.0         UG        0 0          0 wlo1
10.8.0.9        *               255.255.255.255 UH        0 0          0 tun0
********(security reasons ) 192.168.0.1     255.255.255.255 UGH       0 0          0 wlo1
192.168.0.0     *               255.255.255.0   U         0 0          0 wlo1
192.168.0.1     *               255.255.255.255 UH        0 0          0 wlo1

but only the router's gateway is used by the game.

In order to be able to play it is important to get rid of the router's gateway therefore I need to execute the following command:

sudo ip rout del default via 192.168.0.1

thus it returns the next output :

netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.8.0.9 0.0.0.0 UG 0 0 0 tun0
10.8.0.9 * 255.255.255.255 UH 0 0 0 tun0
******(Security reasons you know :)) 192.168.0.1 255.255.255.255 UGH 0 0 0 wlo1
192.168.0.0 * 255.255.255.0 U 0 0 0 wlo1
192.168.0.1 * 255.255.255.255 UH 0 0 0 wlo1 

at this moment the game connection works properly.

The problem is that after a few minutes the router's gateway is back as default !! and the game gets disconnected after that.

is there some idea to fix this problem?

I leave my server.conf and client.conf

Server.conf:

;local a.b.c.d
port 1194
;proto tcp
proto udp
;dev tap
dev tun
;dev-node MyTap

ca ca.crt
cert server.crt
key server.key  
dh dh4096.pem

;topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
;server-bridge 192.168.1.254 255.255.255.0 192.168.1.150 192.168.1.200
;server-bridge

;push "route 192.168.10.0 255.255.255.0"
;push "route 192.168.20.0 255.255.255.0"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 10.8.0.0 255.255.255.0
;learn-address ./script
;up up.sh
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

client-to-client

duplicate-cn

keepalive 10 120

;tls-auth ta.key 0 # This file is secret

;cipher BF-CBC        # Blowfish (default)
;cipher AES-128-CBC   # AES
;cipher DES-EDE3-CBC  # Triple-DES

comp-lzo

user nobody
group nobody

persist-key
persist-tun

;log         openvpn.log
;log-append  openvpn.log

verb 3

;mute 20

Client.conf

client
;dev tap
dev tun
.
;dev-node MyTap
;proto tcp
proto udp
remote ******** 1194  <- quite esa ip por cuestiones de seguridad(ustedes saben XD)
;remote my-server-2 1194
;remote-random

resolv-retry infinite
nobind

user nobody
group nobody

persist-key
persist-tun

;http-proxy-retry # retry on connection failures
;http-proxy [proxy server] [proxy port #]

mute-replay-warnings

ca ca.crt
cert client1.crt
key client1.key

;tls-auth ta.key 1

;cipher x

comp-lzo

redirect-gateway def1

verb 3

;mute 20

Im using opensuse Tumbleweed and openVpn for the client side and opensuse leap 42.1 and Openvpn for the server side by the way Im using Knetworkmanager for wifi connection but I've used wicked for ethernet connection as well

Client: OpenVPN 2.3.11 x86_64-suse-linux-gnu Server: OpenVPN 2.3.8 x86_64-suse-linux-gnu

1
  • You don’t have anything in your OpenVPN config that would cause this route to be created. There are some redundancies (redirect-gateway both via push and in client config) though.
    – Daniel B
    Commented Oct 22, 2016 at 10:05

2 Answers 2

0

I did averything you said but It is still without working even though I make sure the vpns's metrics are slower than router's gateway so after being tired of disconnections I made this little srcript. I don't think this is the best way to solve it but at least it works

#!/bin/bash
 while true do
 ip route del default via 192.168.0.1 2>/dev/null 
done 
0

Your problem isn't really that you have multiple default routes, but that the VPN default has a higher metric that the routers (though we can't see it in your netstat - try adding -v to see it).

You either solve it by increasing the metric for the routers default,

or you lower the VPNs with:

push "route-metric N"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .