>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





Hi,
Thank you so much for your reply.
You said "This is not what I would have - I'd have a public IP address on the 
NIC,or 2, or 3.", does that mean you assign a separate network card for each IP 
address? If yes, then if your server is physical, the number of your network 
cards is limited.

When I use "multihome" statement, then OpenVPN listen to the all IP addresses 
that set on my server. For example, if my server has three IP addresses, then I 
can use them in the client configuration file. Am I right? If yes, then in this 
situation my firewall rules associates NICs to OpenVPN IP ranges.

When you create a virtual NIC in the FreeBSD, then can you ping a target by its 
name via that virtual NIC?


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

Reply via email to