I am trying to learn how to set up OpenVPN. Eventually I would like to have a roadwarrior setup.
I decided to use the sample.ovpn file to start with. I generated a static key for the purpose of exploring this. I setup dyndns and have my ports open.
My understanding is that one of my peers has to function as the server and the sample config file's comment say to remove the remote line in order to make it the server. When I do that, and try to connect (I am using the OpenVPN Windows GUI) the icon goes yellow and says "Connection to: sample" and never connects.
However, if I leave in the remote line, it *does* connect and goes green. What am I misunderstanding here?
Here is my configuration (with the remote statement commented out and scrubbed):
;remote mydyndsurl.org
dev tap
ifconfig 10.3.0.1 255.255.255.0
secret key.txt
ping 10
comp-lzo
verb 6
mute 10
and here is a log sample:
Thu Jul 25 14:02:27 2013 Current Parameter Settings:
Thu Jul 25 14:02:27 2013 config = 'sample.ovpn'
Thu Jul 25 14:02:27 2013 mode = 0
Thu Jul 25 14:02:27 2013 show_ciphers = DISABLED
Thu Jul 25 14:02:27 2013 show_digests = DISABLED
Thu Jul 25 14:02:27 2013 show_engines = DISABLED
Thu Jul 25 14:02:27 2013 genkey = DISABLED
Thu Jul 25 14:02:27 2013 key_pass_file = '[UNDEF]'
Thu Jul 25 14:02:27 2013 show_tls_ciphers = DISABLED
Thu Jul 25 14:02:27 2013 Connection profiles [default]:
Thu Jul 25 14:02:27 2013 NOTE: --mute triggered...
Thu Jul 25 14:02:27 2013 275 variation(s) on previous 10 message(s) suppressed by --mute
Thu Jul 25 14:02:27 2013 OpenVPN 2.3.2 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [PKCS11] [eurephia] [IPv6] built on Jun 3 2013
Thu Jul 25 14:02:27 2013 MANAGEMENT: TCP Socket listening on [AF_INET]127.0.0.1:25341
Thu Jul 25 14:02:27 2013 Need hold release from management interface, waiting...
Thu Jul 25 14:02:27 2013 MANAGEMENT: Client connected from [AF_INET]127.0.0.1:25341
Thu Jul 25 14:02:27 2013 MANAGEMENT: CMD 'state on'
Thu Jul 25 14:02:27 2013 MANAGEMENT: CMD 'log all on'
Thu Jul 25 14:02:27 2013 MANAGEMENT: CMD 'hold off'
Thu Jul 25 14:02:27 2013 MANAGEMENT: CMD 'hold release'
Thu Jul 25 14:02:27 2013 WARNING: --ping should normally be used with --ping-restart or --ping-exit
Thu Jul 25 14:02:27 2013 Static Encrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Jul 25 14:02:27 2013 Static Encrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Jul 25 14:02:27 2013 Static Decrypt: Cipher 'BF-CBC' initialized with 128 bit key
Thu Jul 25 14:02:27 2013 Static Decrypt: Using 160 bit message hash 'SHA1' for HMAC authentication
Thu Jul 25 14:02:27 2013 LZO compression initialized
Thu Jul 25 14:02:27 2013 Socket Buffers: R=[8192->8192] S=[8192->8192]
Thu Jul 25 14:02:27 2013 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0
Thu Jul 25 14:02:27 2013 MANAGEMENT: >STATE:1374775347,ASSIGN_IP,,10.3.0.1,
Thu Jul 25 14:02:27 2013 open_tun, tt->ipv6=0
Thu Jul 25 14:02:27 2013 TAP-WIN32 device [Local Area Connection 2] opened: \\.\Global\{E4627B06-22CB-4B9D-851D-C84E154ABD02}.tap
Thu Jul 25 14:02:27 2013 TAP-Windows Driver Version 9.9
Thu Jul 25 14:02:27 2013 TAP-Windows MTU=1500
Thu Jul 25 14:02:27 2013 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.3.0.1/255.255.255.0 on interface {E4627B06-22CB-4B9D-851D-C84E154ABD02} [DHCP-serv: 10.3.0.0, lease-time: 31536000]
Thu Jul 25 14:02:27 2013 Successful ARP Flush on interface [26] {E4627B06-22CB-4B9D-851D-C84E154ABD02}
Thu Jul 25 14:02:27 2013 Data Channel MTU parms [ L:1577 D:1450 EF:45 EB:135 ET:32 EL:0 AF:3/1 ]
Thu Jul 25 14:02:27 2013 Local Options String: 'V4,dev-type tap,link-mtu 1577,tun-mtu 1532,proto UDPv4,ifconfig 10.3.0.0 255.255.255.0,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,secret'
Thu Jul 25 14:02:27 2013 Expected Remote Options String: 'V4,dev-type tap,link-mtu 1577,tun-mtu 1532,proto UDPv4,ifconfig 10.3.0.0 255.255.255.0,comp-lzo,cipher BF-CBC,auth SHA1,keysize 128,secret'
Thu Jul 25 14:02:27 2013 Local Options hash (VER=V4): 'e08453d7'
Thu Jul 25 14:02:27 2013 Expected Remote Options hash (VER=V4): 'e08453d7'
Thu Jul 25 14:02:27 2013 UDPv4 link local (bound): [undef]
Thu Jul 25 14:02:27 2013 UDPv4 link remote: [undef]
I appreciate any help you can give. Also: I would love to understand, so if you can, I'd love to hear a reason and not simply, "change X to Y".
Thanks!