I have openvpn server installed on server.

My external network interface is : eth0.

eth0 have external\real IP addr like

I also have eth0:1 interface alias wich have ip addr like

What I should to to make openvpn use SOURCE ADDRESS and not the ?

my default route looks like:         UG    0      0        0 eth0

is there some openvpn option for server to bind some interface and use it's ip wich works ok with IP assigned as an alias ?

  • You really should get rid of alias interfaces if at all possible. Linux natively supports multiple IP addresses per interface. // What exactly do you mean by “source address”? Do you perhaps mean that VPN clients should appear as on the external network? – Daniel B May 14 '20 at 10:54

The primary operation is actually binding to an address, not to an interface. (That exists but is a secondary thing that's much less commonly used.) So you can forget interfaces and directly tell OpenVPN to bind to your preferred address using the 'local' option:


Also note that "interface aliases" on Linux are not real interfaces. They're just lies that the kernel tells to old out-of-date tools such as 'ifconfig', but in reality you just have a single 'eth0' interface with two addresses.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.