Configuration Open VPN Server

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
walther_the_nerd
OpenVpn Newbie
Posts: 3
Joined: Mon Jul 11, 2022 3:16 pm

Configuration Open VPN Server

Post by walther_the_nerd » Mon Jul 11, 2022 3:20 pm

Hello,

i config a OpenVPN Server and connect with a client. In my server.conf i redirect my traffic trough the vpn gateway. but i still need to open my firewall ports on my client like 80/443 for http/s. How is that.

After my understanding i only need the OpenVPN Port to open to get my traffic trough?!

I hope you can help me with that.

Best regards
Last edited by walther_the_nerd on Mon Jul 11, 2022 4:44 pm, edited 1 time in total.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1332
Joined: Tue Feb 16, 2021 10:41 am

Re: Configuration Access Server

Post by openvpn_inc » Mon Jul 11, 2022 4:12 pm

Hi Walther,

First off, your Subject mentions "Access Server", and if you mean the commercial product OpenVPN Access Server, you're asking in the wrong forum. We have subforums for the commercial products. This one is for the open source project.

Since you mention "server.conf" I will assume we are in the right place, because Access Server does not have that file.

I am not sure why you are asking about opening firewall ports on your client? That's not an openvpn question; that would be one for a place which supports your client OS.

The server needs to have the openvpn port (usually udp/1194, but can be whatever you set it to) open in the external firewall, possibly being forwarded to the server host from an external-facing router. The client connects to your.ip.add.ress:port and is given a VPN address, plus routes to be able to use it with.

Perhaps these two wiki pages will help:
https://community.openvpn.net/openvpn/w ... edwithOVPN
https://community.openvpn.net/openvpn/wiki/HOWTO

Good luck, regards, rob0
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

walther_the_nerd
OpenVpn Newbie
Posts: 3
Joined: Mon Jul 11, 2022 3:16 pm

Re: Configuration Open VPN Server

Post by walther_the_nerd » Mon Jul 11, 2022 4:46 pm

yes, the problem is the routing i think, cause i open 1194 already but cant access the internet from client when i dont open port 80,443 for surfing. so for me the server.config is not doing what it should do, redirect all traffic thought my openvpn server. i dont see a reason to open the ports 80,443 for my client when i tunneling though my vpn. for my opinion i need to open the ports on the server to get through?! where is the failure?

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1332
Joined: Tue Feb 16, 2021 10:41 am

Re: Configuration Open VPN Server

Post by openvpn_inc » Mon Jul 11, 2022 5:03 pm

walther_the_nerd wrote:
Mon Jul 11, 2022 4:46 pm
yes, the problem is the routing i think, cause i open 1194 already but cant access the internet from client when i dont open port 80,443 for surfing. so for me the server.config is not doing what it should do, redirect all traffic thought my openvpn server. i dont see a reason to open the ports 80,443 for my client when i tunneling though my vpn. for my opinion i need to open the ports on the server to get through?! where is the failure?
Hi Walther,

The server OS must be configured to do IP forwarding, and its firewall would have to be configured to do source NAT for VPN clients. This is covered in the HOWTO linked above.

The server would get a new interface typically called "tun0". You should not have firewall restrictions on that interface. Packets (inside the tunnel) from clients would come in on tun0, and if destined for the Internet, they would go out on the interface of the server's default route.

regards, rob0
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

walther_the_nerd
OpenVpn Newbie
Posts: 3
Joined: Mon Jul 11, 2022 3:16 pm

Re: Configuration Open VPN Server

Post by walther_the_nerd » Tue Jul 12, 2022 12:19 am

thats alright, and works.

but there is one point for me:

after my understanding the openvpn server should handel all traffic so all incoming and outgoing, so when there is a https request it should go through the 1194 port and ends up on the other site at the openvpn, after that the openvpn server should send the request as itself. so how can it be that i need to open the https port on the client when the traffic goes through port 1194 shouldnt i open the port for https on the openvpn server for the https request? thats my understanding for the functionality of that technic?!

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1332
Joined: Tue Feb 16, 2021 10:41 am

Re: Configuration Open VPN Server

Post by openvpn_inc » Tue Jul 12, 2022 3:59 am

Walther, don't confuse the tunnel's traffic with the traffic inside the tunnel. Think of the udp/1194 as a transport layer. The server has to receive the client's openvpn packet on udp/1194, but then openvpn creates a virtual interface with the tunneled packets.

These tunneled packets have a different source and destination IP address, and can be any port or protocol. To your server or client OS the virtual interface just looks like another NIC.

I looked for a good diagram of the process, but I didn't find one. But maybe it will help you to think of openvpn as a transport layer for the tun interface driver.

regards, rob0
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply