Changing routing on Ubuntu clients

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
sunnyday
OpenVpn Newbie
Posts: 1
Joined: Wed Feb 10, 2021 12:30 pm

Changing routing on Ubuntu clients

Post by sunnyday » Wed Feb 10, 2021 12:38 pm

Apologies in advance if this is the wrong board for this question.

We have an OpenVPN server for our office (tun not tap). Colleagues using Mac and Windows clients can, at least, select whether all not to send "All Traffic" over the VPN connection (and the more sophisticated can set up multiple configurations on their client, to send all traffic, just the 'internal' traffic, or the internal plus traffic to selected other destinations.

However, colleagues on Ubuntu (either 18 or 20), who have installed the client using apt-get, don't seem to have any option - all traffic goes over the VPN.

Is there a way to configure this on the standard Ubuntu client? Or is there a 'deluxe' client available for Ubuntu which would offer this option?

TIA.

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: Changing routing on Ubuntu clients

Post by 300000 » Wed Feb 10, 2021 1:50 pm

Unbutu is free software you have free to make it work as you like. Windows and MaC need to pay for somebody's work .the trouble is unbutu is very easy with one person but difficult with other so depen the person who use it can handle the task.

Here it how you need to create two profile one is everything go over VPN ADD this one in config file


route 0.0.0.0 192.0.0.0 vpn_gateway
route 64.0.0.0 192.0.0.0 vpn_gateway
route 128.0.0.0 192.0.0.0 vpn_gateway
route 192.0.0.0 192.0.0.0 vpn_gateway

And you need to create one profile to let only internal traffi over vpn . The rest go over local gateway . Add this one and it will do for you

route 0.0.0.0 192.0.0.0 net_gateway
route 64.0.0.0 192.0.0.0 net_gateway
route 128.0.0.0 192.0.0.0 net_gateway
route 192.0.0.0 192.0.0.0 net_gateway



This way it work for all kind of clients .from mac . Windows. Android.linux. so as soon as you can create it shold do the job

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Changing routing on Ubuntu clients

Post by TinCanTech » Wed Feb 10, 2021 4:42 pm

Once again, the back-to-front way of using --redirect-gateway correctly.

Post Reply