HELP: reroute my traffic through a virtual adapter

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
merememories
Level 1
Level 1
Posts: 6
Joined: Sun Sep 24, 2017 7:43 pm

HELP: reroute my traffic through a virtual adapter

Postby merememories » Sun Sep 24, 2017 10:20 pm

Hello everyone,

I created a virtual adapter and got it to connect to my vpn server.

the result of

Code: Select all

ifconfig


Code: Select all

enp7s0    Link encap:Ethernet  HWaddr 00:8c:fa:27:27:c5 
          inet addr:10.80.31.82  Bcast:10.80.31.255  Mask:255.255.255.0
          inet6 addr: fe80::ecd0:c9a:e53d:f63b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:16885 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11807 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:15238707 (15.2 MB)  TX bytes:1638244 (1.6 MB)
          Interrupt:16

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1333 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1333 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:144628 (144.6 KB)  TX bytes:144628 (144.6 KB)

vpn_adapter Link encap:Ethernet  HWaddr 00:ac:cf:2c:31:cb 
          inet6 addr: fe80::2ac:cfff:fe2c:31cb/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1402 (1.4 KB)  TX bytes:3069 (3.0 KB)

wlp8s0    Link encap:Ethernet  HWaddr 20:68:9d:e1:e0:e9 
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


I tried to add int addr(192.168.30.1) to my vpn_adapter and then applied something like this:

Code: Select all

ip route add 192.168.30.1 via 10.80.31.82
ip route del default via 10.80.31.82
ip route add default via 192.168.30.1


but it is not working. Can someone please help me with this? I dont know what I am missing.

EDIT:: here is the route table:

Code: Select all

default via 10.80.31.254 dev enp7s0  proto static  metric 100
10.80.31.0/24 dev enp7s0  proto kernel  scope link  src 10.80.31.82  metric 100
10.140.1.100 via 10.80.31.254 dev enp7s0  proto dhcp  metric 100
169.254.0.0/16 dev enp7s0  scope link  metric 1000

Return to “Other networking topics”

Who is online

Users browsing this forum: No registered users and 5 guests