Greetings!
I have a few questions I hope someone here can shed some light on..I have an OpenVPN server running on a debian machine with a Win7 client, and primary goal is to have the win7 machine route ALL traffic through the VPN. When I am browsing the web with the client it reports the VPN servers public IP which is all fine and dandy, right? Server config, client config and routing tables posted below..
Question 1: When I connect to the debian machine through SSH, the log on the server reports a connection from the win7 machines public IP, shouldn't it report its own public IP or from the local VPN subnet (10.8.0.0/24) considering I'm connection from inside the VPN? Its the same if i connect to the debian machines ftp server, it reports a connection from the clients public IP..this makes me doubt the client is actually routing all traffic through the tunnel.
Question 2: The TAP-WIN32 adapter gets assigned IP: 10.8.0.6/255.255.255.252 (also, how can i change this so the clients connecting gets assigned to subnet 10.8.0.0/24?) but no default GW. Does this affect anything? The client seems to be connection to the server just fine, with at least web traffic going through the VPN.
Question 3: I can not ping the server from the client, nor the client from the server. (Trying to ping 10.8.0.1 from the client and 10.8.0.6 from the server, but it times out), is this iptables issue or a routing issue?
Server config:
port 1194
proto udp
dev tun
#client-connect /etc/openvpn/clientconnect.sh
#client-disconnect /etc/openvpn/clientdisconnect.sh
#script-security 2
ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt
cert /etc/openvpn/easy-rsa/2.0/keys/server.crt
key /etc/openvpn/easy-rsa/2.0/keys/server.key
dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/2.0/keys/ta.key 0
cipher BF-CBC # Blowfish (default)
comp-lzo
max-clients 1
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
log openvpn.log
verb 4
Client config:
client
ns-cert-type server
persist-key
persist-tun
dev tun
tun-mtu 1500
ca ca.crt
cert client1.crt
key client1.key
auth-user-pass
pull
tls-client
tls-auth ta.key 1
tls-exit
cipher BF-CBC
ping 10
comp-lzo
verb 4
mute 10
remote my.vpn.server
port 1194
proto udp
Client routing table:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 10.20.30.1 10.20.30.212 20
0.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 30
10.8.0.1 255.255.255.255 10.8.0.5 10.8.0.6 30
10.8.0.4 255.255.255.252 On-link 10.8.0.6 286
10.8.0.6 255.255.255.255 On-link 10.8.0.6 286
10.8.0.7 255.255.255.255 On-link 10.8.0.6 286
10.20.30.0 255.255.255.0 On-link 10.20.30.212 276
10.20.30.212 255.255.255.255 On-link 10.20.30.212 276
10.20.30.255 255.255.255.255 On-link 10.20.30.212 276
127.0.0.0 255.0.0.0 On-link 127.0.0.1 306
127.0.0.1 255.255.255.255 On-link 127.0.0.1 306
127.255.255.255 255.255.255.255 On-link 127.0.0.1 306
128.0.0.0 128.0.0.0 10.8.0.5 10.8.0.6 30
vpn.public.ip 255.255.255.255 10.20.30.1 10.20.30.212 20
224.0.0.0 240.0.0.0 On-link 127.0.0.1 306
224.0.0.0 240.0.0.0 On-link 10.20.30.212 276
224.0.0.0 240.0.0.0 On-link 10.8.0.6 286
255.255.255.255 255.255.255.255 On-link 127.0.0.1 306
255.255.255.255 255.255.255.255 On-link 10.20.30.212 276
255.255.255.255 255.255.255.255 On-link 10.8.0.6 286
===========================================================================
Persistent Routes:
None
The win7 client is residing on my local network on subnet 10.20.30.0/24..