First, sorry for my poor english, I'm french.
Server CONFIG :
I installed openVPN server 2.1.3-2 on a Debian Squeeze.
This machine is also a router directly connected to WAN in 193.X.X.X.
My private network is in 192.168.10.0/24
Routing is ON
Config file :
Code: Select all
port 1194
proto udp
dev tun
ca /etc/openvpn/2.0/keys/ca.crt
cert /etc/openvpn/2.0/keys/server.crt
key /etc/openvpn/2.0/keys/server.key
dh /etc/openvpn/2.0/keys/dh1024.pem
tls-auth /etc/openvpn/2.0/keys/ta.key 0
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
keepalive 10 120
cipher BF-CBC
comp-lzo
max-clients 2
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3
mute 20
Client CONFIG :
My client machine is connected in a private network in 172.31.33.0/24.
On the router behind this machine, the port 1194 is open.
Config file :
Code: Select all
client
dev tun
proto udp
remote 193.XX.XX.XX 1194
resolv-retry infinite
nobind
user nobody
group nogroup
persist-key
persist-tun
mute-replay-warnings
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/***.crt
key /etc/openvpn/keys/***.key
ns-cert-type server
tls-auth /etc/openvpn/keys/ta.key 1
cipher BF-CBC
comp-lzo
verb 3
mute 20
When I start the server daemon, and make ifconfig, i can see the tun0 interface which have ip 10.8.0.1.
I understood that, openvpn's dhcp makes "subnets" in /30 (255.255.255.252)
That means that for a first client connection PPTP, the network's address is 10.8.0.0, server's ip 10.8.0.1, client's ip 10.8.0.2 and broadcast address 10.8.0.3.
For a second connection, network's address will be 10.8.0.4, server 10.8.0.5, client 10.8.0.6 and broadcast 10.8.0.7... That's ok ?
My problem is that when I start now the client daemon, the ip which is attribuate is 10.8.0.6 (so the client's ip of the second subnet) and for this reason, the gateway is 10.8.0.5 (the server's ip of this subnet).
That's because I put the line in server.ovpn :
Code: Select all
push "redirect-gateway def1 bypass-dhcp"
I tried to configure XP client or Debian client, I have the same problem.
On XP :
Code: Select all
ipconfig /all
Anyone could help me please ?