Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using ubuntu 10.04 on both ends.

We have a client and server machine on the SAME network attempting to make a vpn connection. We use the config files from here and made minimal changes.

The server and client start and seem to connect without any trouble. The server looks like:

Wed Feb 23 22:13:22 2011 MULTI: multi_create_instance called
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 Re-using SSL/TLS context
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 LZO compression initialized
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 Control Channel MTU parms [ L:1574 D:138 EF:38 EB:0 ET:0 EL:0 ]
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 Data Channel MTU parms [ L:1574 D:1450 EF:42 EB:135 ET:32 EL:0 AF:3/1 ]
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 Local Options hash (VER=V4): 'f7df56b8'
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 Expected Remote Options hash (VER=V4): 'd79ca330'
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 TLS: Initial packet from 192.168.1.55:47166, sid=69112e42 5458135b
*...*
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 Control Channel: TLSv1, cipher TLSv1/SSLv3 DHE-RSA-AES256-SHA, 1024 bit RSA
Wed Feb 23 22:13:22 2011 192.168.1.55:47166 [client1] Peer Connection Initiated with 192.168.1.55:47166

On the client side the connection looks like:

Wed Feb 23 22:20:07 2011 [server] Peer Connection Initiated with [AF_INET]192.168.1.41:1194
Wed Feb 23 22:20:10 2011 SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Wed Feb 23 22:20:10 2011 PUSH: Received control message: 'PUSH_REPLY,route-gateway 10.8.0.4,ping 10,ping-restart 120,ifconfig 10.8.0.50 255.255.255.0'
...
Wed Feb 23 22:20:10 2011 /sbin/ifconfig tap0 10.8.0.50 netmask 255.255.255.0 mtu 1500 broadcast 10.8.0.255
Wed Feb 23 22:20:10 2011 Initialization Sequence Completed

The openvpn server has been configured to assign ip addresses in the range 10.8.0.* and the client has been given 10.8.0.50. When I run the following nmap from the client:

Starting Nmap 5.00 ( http://nmap.org ) at 2011-02-23 22:04 EST
Host 10.8.0.50 is up (0.00047s latency).
Nmap done: 256 IP addresses (1 host up) scanned in 30.34 seconds

Host 192.168.1.1 is up (0.0025s latency).
Host 192.168.1.18 is up (0.074s latency).
Host 192.168.1.41 is up (0.0024s latency).
Host 192.168.1.55 is up (0.00018s latency).
Nmap done: 256 IP addresses (4 hosts up) scanned in 6.33 seconds

If I run an nmap from the server on 10.8.0.* I get nothing.

If the client has two interfaces (wireless and tap device) when you look for a certain ip address, how does it decide which interface to connect on?

edit I am trying to set up a vpn so that I can connect to my home network from a remote network. It seems like openvpn is connecting but none of the computers on my home network appear as network machines even after the connection is "Established". Stripped versions of the client and server config files are posted below. Thanks for any help you can offer.

server.conf

port 1194
proto udp
dev tap
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt  
key /etc/openvpn/easy-rsa/keys/server.key  # This file should be kept secret
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
ifconfig-pool-persist ipp.txt
server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3

client.conf

client
dev tap
dev-node tap0901
proto udp
remote ********** 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 3

one other thing that might be helpful, I tried to connect using the openvpn gui for windows and the connection stalls out on "obtaining configuration" and the bar just scrolls forever.

share|improve this question
add comment

2 Answers

If a client has more than one interface it decides where to route packets based on the routing table.

Run route -n on the command line. and you'll see the routing table, eg:

matt@watch:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.161.2   0.0.0.0         255.255.255.255 UH    0      0        0 tun0
192.168.161.0   192.168.161.2   255.255.255.0   UG    0      0        0 tun0
192.168.1.0     0.0.0.0         255.255.255.0   U     1      0        0 eth3
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth3
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth3

You can see that the 192.168.161.0/24 subnet is on tun0, which is the openvpn connection. eth3 is the LAN connection with the subnet 192.168.1.0/24

I'm not really sure what your problem here is - can you please include the openvpn config as well as the outcome you're trying to achieve?

share|improve this answer
    
Thanks, I'll edit my original post to include that information. –  bkrupa Feb 25 '11 at 3:20
add comment

What version of OpenVPN are you using?

Can clients ping each other (using their VPN addresses)? Can they ping the server? Can the server ping the clients? You can also use traceroute to see where the connectivity stops.

(should be a comment, can the moderator do that change?)

share|improve this answer
    
Honestly, at this point, I don't recall. I ended up moving to OpenVPN's access server and that took care of the problem. –  bkrupa Nov 4 '13 at 14:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.