OpenVPN on different IP address (eth0:1)
Posted: Sat Jan 02, 2010 2:39 am
Hello
I have a problem with my OpenVPN configuration. I always had one public IP address on my openvpn server, but few days ago I added additional IP (as eth0:1), so I would like to run openvpn on that IP:
Let's assume that my eth0 is 1.2.3.4 and my eth0:1 is 1.2.3.5
server config:
tun-mtu 1500
local 1.2.3.5
ifconfig 10.200.0.1 10.200.0.2
port 5000
proto udp
user nobody
group nogroup
comp-lzo
keepalive 10 60
daemon
verb 0
secret secret.key
client:
dev tun
tun-mtu 1500
ifconfig 10.200.0.2 10.200.0.1
proto udp
remote 1.2.3.5 5000
resolv-retry infinite
nobind
comp-lzo
keepalive 10 60
verb 0
secret secret.key
vpn works fine, it's connecting with eth0:1 1.2.3.5, not 1.2.3.4, but when I try to route my traffic from windows client throughout the vpn, then on the internet I'm still visible as 1.2.3.4, not 1.2.3.5
Can anyone help me with this ? Maybe I'm not so good in routing traffic or iptables nat etc. but I already tried several options and still nothing.
Regards
I have a problem with my OpenVPN configuration. I always had one public IP address on my openvpn server, but few days ago I added additional IP (as eth0:1), so I would like to run openvpn on that IP:
Let's assume that my eth0 is 1.2.3.4 and my eth0:1 is 1.2.3.5
server config:
tun-mtu 1500
local 1.2.3.5
ifconfig 10.200.0.1 10.200.0.2
port 5000
proto udp
user nobody
group nogroup
comp-lzo
keepalive 10 60
daemon
verb 0
secret secret.key
client:
dev tun
tun-mtu 1500
ifconfig 10.200.0.2 10.200.0.1
proto udp
remote 1.2.3.5 5000
resolv-retry infinite
nobind
comp-lzo
keepalive 10 60
verb 0
secret secret.key
vpn works fine, it's connecting with eth0:1 1.2.3.5, not 1.2.3.4, but when I try to route my traffic from windows client throughout the vpn, then on the internet I'm still visible as 1.2.3.4, not 1.2.3.5
Can anyone help me with this ? Maybe I'm not so good in routing traffic or iptables nat etc. but I already tried several options and still nothing.
Regards