Hello i has a VPS and i recently ordered additional ip adress on it.
And i'm planning to configure OpenVPN to work on both IP's here's my config
IP 1
local 133.130.54.187
port 443
proto tcp
dev tun
server 10.8.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
max-clients 20
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
client-cert-not-required
username-as-common-name
auth-user-pass-verify "/etc/openvpn/login/auth_vpn" via-file #
tmp-dir "/etc/openvpn/" #
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/SquashVPN.crt
key /etc/openvpn/keys/SquashVPN.key
dh /etc/openvpn/keys/dh2048.pem
status /var/www/html/tcp.txt 1
script-security 2
reneg-sec 86400
IP 2
[code]local 133.130.50.120
port 443
proto tcp
dev tun
server 10.8.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
max-clients 20
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 208.67.222.222"
keepalive 10 120
comp-lzo
persist-key
persist-tun
verb 3
client-cert-not-required
username-as-common-name
auth-user-pass-verify "/etc/openvpn/login/auth_vpn" via-file #
tmp-dir "/etc/openvpn/" #
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/SquashVPN.crt
key /etc/openvpn/keys/SquashVPN.key
dh /etc/openvpn/keys/dh2048.pem
status /var/www/html/tcp.txt 1
script-security 2
reneg-sec 86400
[/code]
My IPTables
-A POSTROUTING -s 10.8.1.0/24 -j SNAT --to-source 133.130.54.187
-A POSTROUTING -s 10.8.2.0/24 -j SNAT --to-source 133.130.54.187
If i tried
-A POSTROUTING -s 10.8.2.0/24 -j SNAT --to-source 133.130.50.120
There's no browse.
But if
-A POSTROUTING -s 10.8.2.0/24 -j SNAT --to-source 133.130.54.187
There is?
And when i'm connected to IP2 and checkmyip the IP2 comes from the IP of IP1.
Thank's in advance