0

I have openvpn server installed on server.

My external network interface is : eth0.

eth0 have external\real IP addr like 33.33.33.33

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

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

my default route looks like:

0.0.0.0         33.33.33.1     0.0.0.0         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 ?

1
  • 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 44.44.44.44 on the external network? – Daniel B May 14 '20 at 10:54
0

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:

local 44.44.44.44

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.