I want to assign openvpn client to each device

thank you very much. here is my problem it set default route, how can i remove or delete it. i want it to use the tun* that i wish to use. i have tun 1,5.

0.0.0.0/1 via 172.111.247.225 dev tun5
default via 172.111.247.225 dev tun5
default via 192.168.100.1 dev usb0 proto static src 192.168.100.236 metric 20
default via 192.168.100.1 dev phy1-sta0 proto static src 192.168.100.64 metric 30
5.254.15.98 via 192.168.100.1 dev usb0
5.254.26.33 via 192.168.100.1 dev usb0
110.110.120.0/24 dev br-lan1.4090 proto kernel scope link src 110.110.120.1
128.0.0.0/1 via 172.111.247.225 dev tun5
162.16.1.0/24 dev lan4 proto kernel scope link src 162.16.1.1 linkdown
172.16.10.0/24 dev br-lan1.10 proto kernel scope link src 172.16.10.1
172.16.20.0/24 dev br-lan2.11 proto kernel scope link src 172.16.20.1 linkdown
172.16.30.0/24 dev br-lan3.12 proto kernel scope link src 172.16.30.1 linkdown
172.111.247.224/27 dev tun5 proto kernel scope link src 172.111.247.231
192.168.100.0/24 dev usb0 proto static scope link metric 20
192.168.100.0/24 dev phy1-sta0 proto static scope link metric 30
206.123.135.160/27 dev tun1 proto kernel scope link src 206.123.135.177
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.111.247.225 128.0.0.0       UG    0      0        0 tun5
0.0.0.0         172.111.247.225 0.0.0.0         UG    0      0        0 tun5
0.0.0.0         192.168.100.1   0.0.0.0         UG    20     0        0 usb0
0.0.0.0         192.168.100.1   0.0.0.0         UG    30     0        0 phy1-sta0
5.254.15.98     192.168.100.1   255.255.255.255 UGH   0      0        0 usb0
5.254.26.33     192.168.100.1   255.255.255.255 UGH   0      0        0 usb0
110.110.120.0   0.0.0.0         255.255.255.0   U     0      0        0 br-lan1.4090
128.0.0.0       172.111.247.225 128.0.0.0       UG    0      0        0 tun5
162.16.1.0      0.0.0.0         255.255.255.0   U     0      0        0 lan4
172.16.10.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan1.10
172.16.20.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan2.11
172.16.30.0     0.0.0.0         255.255.255.0   U     0      0        0 br-lan3.12
172.111.247.224 0.0.0.0         255.255.255.224 U     0      0        0 tun5
192.168.100.0   0.0.0.0         255.255.255.0   U     20     0        0 usb0
192.168.100.0   0.0.0.0         255.255.255.0   U     30     0        0 phy1-sta0
206.123.135.160 0.0.0.0         255.255.255.224 U     0      0        0 tun1

it keeps routing back to the default tun

:man_facepalming:

I think you missed my ealier points... your configuration is severely messed up as a whole. Your routing tables are not the primary issue.

1 Like

i have finish configuring the router, it is working, i told you that my configuration is not the problem. vlan is working as expected with proxmox. pbr is working well too, it assign a default tun* on the network interface. but it take much time before assigning tun* to a local ip address device. I understand what you said you want me to start from scratch because my configuration confuses you. this is first time posting in this forum. I just needed example. thank you

You may have something that appears to work, but your configuration is likely a house of cards, and probably doesn't do what you are expecting (aside from maybe the routes to the VPNs). Security and proper general network functionality are suspect in your config.

But, since you seem to be happy with where you landed...

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.
Thanks! :slight_smile:

1 Like