kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.7k stars 2.38k forks source link

Connect OpenVPN client in Remote Desktop from LAN PC outside container network #575

Open mancioshell opened 4 years ago

mancioshell commented 4 years ago

Hi, this is my openvpn configuration:

server 192.168.255.0 255.255.255.0

verb 3
key /etc/openvpn/pki/private/info-meta.duckdns.org.key
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/info-meta.duckdns.org.crt
dh /etc/openvpn/pki/dh.pem
tls-auth /etc/openvpn/pki/ta.key
key-direction 0
keepalive 10 60
persist-key
persist-tun

proto tcp
# Rely on Docker to do port mapping, internally always 1194
port 1194
dev tun0
status /tmp/openvpn-status.log

user nobody
group nogroup

### Route Configurations Below

### Push Configurations Below
push "block-outside-dns"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

push "route 192.168.1.0 255.255.255.0"
#push "redirect-gateway def1"

### Extra Configurations Below

I have established with success Openvpn client to server connection. All my clients can reach and ping other LAN clients where my docker container run. I would like to connect in RDP from my LAN PC to any of these openvpn clients, but unfortunately i can't ping any of vpn clients connected, outside docker container.

In summary, i have the following network topology and i would like ping from 192.168.1.5 to 192.168.255.2.

Immagine

Any advice?

smaccie commented 4 years ago

I have similar issue, I have a routing configured but I can not ping, tcpdump shows the traffic hit tun0 interface, but other side didn't receive any packet