2

I'm using openSuSE as a router. eth0 is the WAN NIC, eth1 is the LAN NIC. I also have a tun10 device, which I'm using with an OpenVPN client connection.

I want yast routes to specify what traffic has to go out over the OpenVPN tunnel. All other traffic should continue to go out over eth0 (the default route). That's why I'm using route-nopull, since the OpenVPN server pushes a default route for 0.0.0.0/32.

However, I don't see the routes defined in yast show up in route -n.

How can I make them work?

The IP addressed below are made up. (Except one for whatismyip.com)

OpenVPN client.conf
some excerpts

client
route-nopull
dev tun10
proto udp

YaST network settings -> routing

default gateway: 101.102.103.104
device: eth0

routes: (just one example)

  • destination: 141.101.120.15 (whatismyip.com)
  • gateway: 10.20.30.40
  • genmask: 255.255.255.255
  • device: tun10

route -n output
the marked lines only show up when I start the VPN tunnel without route-nopull

Destination Gateway         Genmask         Flags Iface
0.0.0.0     10.20.30.40     128.0.0.0       UG    tun10 //without route-nopull
0.0.0.0     101.102.103.104 0.0.0.0         UG    eth0
10.0.0.0    0.0.0.0         255.255.255.0   U     eth1
128.0.0.0   10.20.30.40     128.0.0.0       UG    tun10 //without route-nopull
10.20.30.40 0.0.0.0         255.255.255.255 UH    tun10 //without route-nopull
10.20.30.41 10.20.30.40     255.255.255.255 UHG   tun10 //without route-nopull
Dave M
  • 4,514
  • 22
  • 31
  • 30
derabbink
  • 261
  • 5
  • 16

1 Answers1

1

As far as I know, YaST will not create those rules for you. If you really want to use YaST, I can not help - but if you only want to make your routes work, try this:

Add a route option to your OpenVPN client configuration (see the OpenVPN man page at --route for details). That way the routes will be added after a successfull connection is made with OpenVPN.

For example:

route 141.101.120.15 255.255.255.255 10.20.30.40

hgj
  • 85
  • 1
  • 1
  • 6