1

I'm trying to configure VPN between two PCs both running Ubuntu 14.04 x64. I have created and configured OpenVPN server on one of them, OpenVPN daemon is online and I can see tun0 interface in ifconfig output. Then I've configured OpenVPN client on the other PC, generated cert request, signed it and so on. Client daemon started successfully but there is no tun interfaces in ifconfig's output. Client's logs are empty and tcpdump shows that client sends 42 byte packes to server (server's tcpdump shows that it successfully receives these packets, but does not sent anything back).

I can ping server by its public address, but cannot ping it using it's private address.

Here are configs:

server's:

port 1194
proto udp
dev tun
user openvpn
group openvpn
cd /etc/openvpn
persist-key
persist-tun
tls-server
tls-timeout 120
dh /etc/openvpn/dh.pem
ca /etc/openvpn/ca.crt
cert /etc/openvpn/vpn-server.crt
key /etc/openvpn/server.key
crl-verify /etc/openvpn/crl.pem
tls-auth /etc/openvpn/ta.key 0
server 10.15.0.0 255.255.255.0
client-config-dir /etc/openvpn/ccd
client-to-client
topology subnet
max-clients 5
push "dhcp-option DNS 10.15.0.1"
route 10.15.0.0 255.255.255.0
comp-lzo
keepalive 10 120
status /var/log/openvpn/opnvpn-status.log 1
status-version 3
log-append ./var/log/openvpn/openvpn-server.log
verb 3
mute 20

client's config:

dev tun
proto udp
remote 10.0.31.136 1194
client
resolv-retry infinite
ca "/etc/openvpn/ca.crt"
cert "/etc/openvpn/developer1.crt"
key "/etc/openvpn/client.key"
tls-auth "/etc/openvpn/ta.key" 1
remote-cert-tls server
persist-key
persist-tun
comp-lzo
verb 3
status /var/log/openvpn-status.log 1
status-version 3
log-append /var/log/openvpn/openvpn-client.log
  • Side note, your server's log-append path starts with a '.'. – user38537 Jan 30 '19 at 1:08
1

The IP address 10.0.31.136 is internal, correct? In this line you must enter your public IP address.

If this is already your public IP, the problem may be static route between networks, run the following command line on both servers:

SERVER route add -net 10.0.0.0 netmask 255.xxx gw xxxx dev eth0

CLIENT route add -net 10.15.0.0 netmask 255.255.xx gw xxxx dev eth0

| improve this answer | |
  • This IP is a public IP for this PC. Both computers are under NAT and there is no other IP's available to them. – Jaro Jan 30 '15 at 10:09
  • Am I rigth that I have to replace 255.255.xx and gw xxxx with correct mask and my gateway IP? In the other case it reports it to be 'Unknown host' – Jaro Jan 30 '15 at 10:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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