Forcing same IP as Server to all Clients

This forum is for admins who are looking to build or expand their OpenVPN setup.
Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
abiteddie
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 12, 2020 4:36 pm

Forcing same IP as Server to all Clients

Post by abiteddie » Mon Oct 12, 2020 4:41 pm

Hi dear Community,
I am struggeling now for quite a while. I have some applications which are running in a VM and have to get bind to a specific, static IP Address. I am Using OPENVPN to get my Clients connected to the OPENVPN Server with the public IP 222.217.224.79.

Now I have to setup the clients somehow so all of them are going to get the same ip 222.217.224.79 configured as there own ones at the tun0 interface. How can I achieve that?

Thank you.

abiteddie
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 12, 2020 4:36 pm

Re: Forcing same IP as Server to all Clients

Post by abiteddie » Fri Oct 16, 2020 11:26 am

Anyone?

Thank you

User avatar
TinCanTech
OpenVPN Protagonist
Posts: 8354
Joined: Fri Jun 03, 2016 1:17 pm

Re: Forcing same IP as Server to all Clients

Post by TinCanTech » Fri Oct 16, 2020 1:01 pm

abiteddie wrote:
Mon Oct 12, 2020 4:41 pm
I have to setup the clients somehow so all of them are going to get the same ip 222.217.224.79 configured as there own ones at the tun0 interface
I can only presume you mean "Redirect the client gateway" .. please see the howto.

abiteddie
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 12, 2020 4:36 pm

Re: Forcing same IP as Server to all Clients

Post by abiteddie » Sat Oct 17, 2020 11:04 am

TinCanTech wrote:
Fri Oct 16, 2020 1:01 pm
abiteddie wrote:
Mon Oct 12, 2020 4:41 pm
I have to setup the clients somehow so all of them are going to get the same ip 222.217.224.79 configured as there own ones at the tun0 interface
I can only presume you mean "Redirect the client gateway" .. please see the howto.
Thank you for you anwser. Does that mean, that my client gets the external IP from the Server assigend to his tun0 interface?

abiteddie
OpenVpn Newbie
Posts: 4
Joined: Mon Oct 12, 2020 4:36 pm

Re: Forcing same IP as Server to all Clients

Post by abiteddie » Sat Oct 17, 2020 11:18 am

From my interface tun0: my inet IP is 10.8.0.2. But i have to here the same IP as the external IP from my Openvpn Server is -> 222.217.224.79

zxun
OpenVpn Newbie
Posts: 9
Joined: Mon Jan 04, 2021 2:26 am

Re: Forcing same IP as Server to all Clients

Post by zxun » Mon Jan 04, 2021 10:49 am

abiteddie wrote:
Sat Oct 17, 2020 11:18 am
From my interface tun0: my inet IP is 10.8.0.2. But i have to here the same IP as the external IP from my Openvpn Server is -> 222.217.224.79
This is exactly what a Virtual Private Net do. Now your vpn server and all its clients are in net 10.8.0.0/24. One machine can have multiple IP's simultaneously and that is how VPN works.

Post Reply