Forcing OpenVPN server to response over same IP

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
yurtesen
OpenVpn Newbie
Posts: 5
Joined: Fri Mar 20, 2020 11:09 am

Forcing OpenVPN server to response over same IP

Post by yurtesen » Thu Jun 17, 2021 11:01 am

Hello,

We have a server at Hetzner and it has a main IP (received using DHCP) "X" and another IP "Y" is added through the Hetzner floating IP system. (setup as static IP)

When a client connects to "Y" the OpenVPN server responds over "X" and this does not work well for UDP connections as firewalls filter the packets.

I could use `local` keyword to configure OpenVPN to listen only on "Y" and then server is able to respond using "Y" IP and things work.

When OpenVPN is listening on all IPs on system. How can I make OpenVPN respond using the same IP that packets were received to?

Thanks!

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Forcing OpenVPN server to response over same IP

Post by TinCanTech » Thu Jun 17, 2021 11:06 am

Try --multihome

yurtesen
OpenVpn Newbie
Posts: 5
Joined: Fri Mar 20, 2020 11:09 am

Re: Forcing OpenVPN server to response over same IP

Post by yurtesen » Thu Jun 17, 2021 11:37 am

TinCanTech wrote:
Thu Jun 17, 2021 11:06 am
Try --multihome
Thank you! It solves the problem!

Post Reply