I
I
Ivan2016-11-20 17:02:55
openvpn
Ivan, 2016-11-20 17:02:55

Why can't I access the client from the Opnenvpn server?

Hello. I am building a tunnel to my LAN. Raised openvpn server on centos, client raspberry pi
server config

port 1194
proto udp
dev tun
sndbuf 0
rcvbuf 0
ca ca.crt
cert server.crt
key server.key
dh dh.pem
tls-auth ta.key 0
topology subnet
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"
push "dhcp-option DNS 127.0.0.1"
keepalive 10 120
cipher AES-128-CBC
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem

client config
client
dev tun
proto udp
sndbuf 0
rcvbuf 0
remote MYIP 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
cipher AES-128-CBC
setenv opt block-outside-dns
key-direction 1
verb 3
<ca>
-----BEGIN CERTIFICATE-----
XXXXXXXXXXXXXXXXXXXXXXXX
-----END CERTIFICATE-----
</ca>
<cert>
Certificate:
  XXXXXXXXXXXXXX
-----BEGIN CERTIFICATE-----
XXXXXXXXXXXXXXXXXXX
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
XXXXXXXXXXXXXXXXXXXXX
-----END PRIVATE KEY-----
</key>
<tls-auth>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
XXXXXXXXXXXXXXXXXXX
-----END OpenVPN Static key V1-----
</tls-auth>

There is a connection, everything works. I know it's a popular topic, but Google didn't help. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan, 2016-11-20
@bordakovskiy

Understood. iptables was configured incorrectly. Everything works as it should.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question