I am trying to add a secondary IP to my VPN tunnel tun0
interface, however I can't seem to get any traffic to originate from the secondary IP. I'm very new to this so apologies if this is a silly question.
This is the command I am using to add the IP:
ip address add 10.11.12.13/24 dev tun0
This is my interface:
tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 100
link/none
inet 10.33.0.5/16 brd 10.33.255.255 scope global tun0
valid_lft forever preferred_lft forever
inet 10.11.12.13/24 scope global tun0
valid_lft forever preferred_lft forever
This is my routing table:
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.33.0.1 128.0.0.0 UG 0 0 0 tun0
default 10.33.0.1 0.0.0.0 UG 0 0 0 tun0
10.33.0.0 0.0.0.0 255.255.0.0 U 0 0 0 tun0
103.108.95.146 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
128.0.0.0 10.33.0.1 128.0.0.0 UG 0 0 0 tun0
unn-138-199-33- 192.168.1.1 255.255.255.255 UGH 0 0 0 eth0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
curl
and ping
from the primary IP succeed:
sudo curl --interface 10.33.0.5 google.com
[HTTP 301 response]
sudo ping -vI 10.33.0.5 google.com
--- google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss
But curl
and ping
from the secondary IP fail:
sudo curl --interface 10.11.12.13 google.com
[no response]
sudo ping -vI 10.11.12.13 google.com
--- google.com ping statistics ---
3 packets transmitted, 0 received, 100% packet loss
Any help would be appreciated.