[oconf] Installation with 2 interfaces

This forum is for admins who are looking to build or expand their OpenVPN setup.

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
tsiris
OpenVpn Newbie
Posts: 1
Joined: Sun Dec 10, 2023 7:23 pm

[oconf] Installation with 2 interfaces

Post by tsiris » Sun Dec 10, 2023 7:31 pm

Good morning,

I have an old server (debian 9) with an openvpn access server version.

I would like to install openvpn on a new server (debian12).

I have never installed OpenVPN, only the AS version

I have two network interfaces, one interface with a public IP (ens192) and a second interface (ens192) which is in my internal network.

My private network is 192.168.100.0/24 and the DHCP server is on another server.

network : 192.168.100.0/24
DCHP : 192.168.100.5
GATEWAY : 192.168.100.254

I would like to be able to connect to my VPN and have an IP in my private network


here is my configuration

/etc/openvpn/server.conf

Code: Select all

local 164.x.x.x
port 1194
proto udp
dev tun

# private network
server 192.168.100.0 255.255.255.0
push "route 192.168.100.0 255.255.255.0"

ca ca.crt
cert server.crt
key server.key
dh dh.pem



push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"

is it ok to be in 'tun' mode ?


is my configuration ok with what I want to do?


thanks in advance

Post Reply