Hi,

On Sun, Aug 20, 2023 at 01:14:55PM +0000, Jason Long via Openvpn-users wrote:
> I googeled my question, but unfortunately, I could not find a correct and 
> complete article about it and I'm thankful if the experts here, write the 
> answer step by step and in summary.
> 
> Suppose you have an OpenVPN server. Now, you want to set two public IP 
> addresses on it. Your public IP addresses are:
> 
> 1.2.3.4
> 1.2.3.5
> 
> Your OpenVPN server has one NIC as below:
> 
> # ifconfig
> enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>         inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255

This is not what I would have - I'd have a public IP address on the NIC,
or 2, or 3.

> Can you show how to prepare your OpenVPN server step by step? For example, 
> You must first create a virtual network card and assign the IP addresses to 
> it then???

How you do that is half "dependent on your service provider" and the
other half "dependent on the Linux distribution you use".

So with my service provider, and using FreeBSD, I would put

ifconfig_en0="1.2.3.4/29"
ifconfig_en0_alias0="1.2.3.5/29"

into /etc/rc.config and reboot.  How to do that with your ISP and your
Linux variant, your ISP and google will tell you.

> The goal of this project is that you want different users to connect to 
> different IP addresses.

Not sure why you'd want that, but in that case, you can either run
one OpenVPN process per IP address (using --local 1.2.3.4 etc.) or
run one OpenVPN process for all of them (using --multihome) and
differenciate by client cert, username, etc.

gert

-- 
"If was one thing all people took for granted, was conviction that if you 
 feed honest figures into a computer, honest figures come out. Never doubted 
 it myself till I met a computer with a sense of humor."
                             Robert A. Heinlein, The Moon is a Harsh Mistress

Gert Doering - Munich, Germany                             g...@greenie.muc.de

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Openvpn-users mailing list
Openvpn-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-users

Reply via email to