voxel vpn with virtual interface GW

1 post / 0 new
sovercngear
sovercngear's picture
voxel vpn with virtual interface GW

I am trying to have the VPN gateway use a virtual interface, 

Creating virtual interface "ifconfig br0:0 10.0.1.5 netmask 255.255.0.0"

So that I can set the default GW as 10.0.1.5 instead of 10.0.1.3 on devices to route through the VPN

 

ifconfig br0  
br0       Link encap:Ethernet  HWaddr A0:40:A0:52:39:8D
          inet addr:10.0.1.3  Bcast:10.0.255.255  Mask:255.255.0.0
          inet6 addr: fe80::a240:a0ff:fe52:398d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64645 errors:0 dropped:0 overruns:0 frame:0
          TX packets:67835 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5245315 (5.0 MiB)  TX bytes:19667042 (18.7 MiB)
 
 ifconfig br0:0
br0:0     Link encap:Ethernet  HWaddr A0:40:A0:52:39:8D
          inet addr:10.0.1.5  Bcast:10.0.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
 ifconfig tun0
tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.4.14.68  P-t-P:10.4.14.68  Mask:255.255.0.0
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:83 (83.0 B)  TX bytes:0 (0.0 B)
 
route -en
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
0.0.0.0         10.4.0.1        128.0.0.0       UG        0 0          0 tun0
0.0.0.0         98.26.88.1      0.0.0.0         UG        0 0          0 brwan
10.0.0.0        0.0.0.0         255.255.0.0     U         0 0          0 br0
10.4.0.0        0.0.0.0         255.255.0.0     U         0 0          0 tun0
98.26.88.0      0.0.0.0         255.255.252.0   U         0 0          0 brwan
128.0.0.0       10.4.0.1        128.0.0.0       UG        0 0          0 tun0
172.18.128.1    0.0.0.0         255.255.255.255 UH        0 0          0 tun2
184.75.221.114  98.26.88.1      255.255.255.255 UGH       0 0          0 brwan
239.0.0.0       0.0.0.0         255.0.0.0       U         0 0          0 br0
 
 

 

Any ideas on how to accomplish this ?