A20 micro openvpn point to point connection

Started by Franco57, April 07, 2021, 05:49:19 PM

Previous topic - Next topic

Franco57

I have an A20 olinuxino micro board on a site where there is no internet connections, so I installed a HSDPA USB modem with a SIM connected to internet and the ppp0 interface works well. The ntp demon works fine so I can sync the date/time correct.
I would like to connect to this board using Openvpn.
I installed Openvpn, created the crt and key on this board and start openvpn like server with tis config file :

port 1194
proto udp
dev tun
ca ca.crt
cert mioserver.crt
key mioserver.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status openvpn-status.log
verb 3

Openvpn starts and works. If I ping 10.8.0.1 this answer ok.

I installed also at home a client in the same manner. Generate the client1.crt and client1.key, copied ca.crt, client1.key, client1.crt on the client allways on /etc/openvpn and the client.ovpn config file is:

client
dev tun
proto udp
remote ip-dyndns-of-my-openvpn-server 1194
nobind
persist-key
persist-tun
ca ca.crt
cert client1.crt
key client1.key
comp-lzo
verb 3

Start the openvpn and starts ok.
But when I try to ping 10.8.0.1 (the server) all packets are without answer.
(note that I have an account on dynodes and on server there is a ddclient demon that update the assigned ip so on the client ovpn config I put the host of this dyndns account and it works).

Maybe I have to add some route roles ... I don't know, So help me to solve this problem. I need to connect from remote as soon as possible.

Thanks.

msx_23

I am not sure if I understand you correctly, especially the last sentence is out of my knowledge:
(note that I have an account on dynodes and on server there is a ddclient demon that update the assigned ip so on the client ovpn config I put the host of this dyndns account and it works).because I never heared of dynodes...

But if you use a mobile internet connection on the server side with no fixed ip-address (this would require a special SIM-card I think) it is expected behaviour that you cannot ping it. The IP-address 10.8.0.1 is not publically available, so its just usable inside a local network on the server side.

A workaround would be to use a proxy server in between, to which the "original" server first connects to and that establishes a reverse tunnel, so that every connection to the proxy gets forwarded to the "original" server