Hi,
thank for reply.
iptables nat was on the wrong IP: iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
it works now.
but I have an other problem:
I want to use two vpn:
one to redirect youtube/purevid trafic when I'm at home, and one completely private when I'm outside:
#VPN pour YOUTUBE
local 111.111.111.111
port 1194
proto tcp
dev tun
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/serveur.crt
key /etc/openvpn/certs/serveur.key
dh /etc/openvpn/certs/dh1024.pem
server 10.8.0.0 255.255.255.0
push "route 173.194.78.0 255.255.255.0"
push "route 68.168.0.0 255.255.0.0"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
...
#VPN pour HOTSPOT
local 222.222.222.222
port 443
proto tcp
dev tun
ca /etc/openvpn/certs/ca.crt
cert /etc/openvpn/certs/serveur.crt
key /etc/openvpn/certs/serveur.key
dh /etc/openvpn/certs/dh1024.pem
server 10.8.1.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
...
These configurations works, but only on a different network interfaces:
ifconfig:
dummy0 Link encap:Ethernet HWaddr XX:XX:XX:XX:XX
inet adr:111.111.111.111 Bcast:111.111.111.255 Masque:255.255.255.255
eth0 Link encap:Ethernet HWaddr bc:30:5b:da:b2:52
inet adr:222.222.222.222 Bcast:222.222.222.255 Masque:255.255.255.0
When it's on the same interface, the push doesn't works, I can't acces to youtube/purevid.
I added nat on dummy0.
I'll try again tonight to give you more details.