Connects on LAN not on WAN

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
faza6769
OpenVpn Newbie
Posts: 2
Joined: Sat Nov 12, 2022 1:59 am

Connects on LAN not on WAN

Post by faza6769 » Sat Nov 12, 2022 2:06 am

Hello Guys

Hope you all doing well. i have a problem and i am not IT-Expert. i installed Openvpn Server. If i am connected to the same Network, my Client connect to the Server, if i am in another network by client, than the client doesnt connect to my OpenVPN-Server. Where should i search for problem to lose it?

thank you everyone.

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: Connects on LAN not on WAN

Post by Pippin » Sat Nov 12, 2022 7:25 am

Hi,

Did you change the --remote directive in the client configuration?
Did you disable the firewall on the server for testing?
Have you done the port forward in the router?

See here:
viewtopic.php?t=22603
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp

faza6769
OpenVpn Newbie
Posts: 2
Joined: Sat Nov 12, 2022 1:59 am

Re: Connects on LAN not on WAN

Post by faza6769 » Sat Nov 12, 2022 6:24 pm

Portforwarding works.
Firewall is enable but i allow port 1194 for Incoming Requests.
But i do not understand how to configure the Client config file correctly. I Changed the IP Adress to Public IP. From LAN it connect. but from WAN doesent.

Client Conf File:


client
dev tun
proto udp
remote <my Public IP> 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
ignore-unknown-option block-outside-dns
auth SHA512-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----

cipher AES-256-CBC

verb 3
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-crypt>

User avatar
ordex
OpenVPN Inc.
Posts: 444
Joined: Wed Dec 28, 2016 2:32 am
Location: IRC #openvpn-devel @ libera.chat

Re: Connects on LAN not on WAN

Post by ordex » Sat Nov 12, 2022 8:21 pm

Check the server log: if you don't see any connection attempt it means the problem is between the two, like Pippin already said.
If you see a connection attempt, please post the log so we can double check.

Post Reply