I have a weird issue. When i connecting to my server (192.168.0.101) trough VPN tunnel from LAN side, it sees me as LAN user with 192.168.0.100 address. Yes, im running OVPN client with Admin rights. When i connecting server from outside (WAN) then Apache sees me as OVPN user with 10.8.0.6
Why?
Now i tried something else. I added network interface alias to my server and set another IP to it.
/etc/network/interfaces
auto eno1
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
auto eno1:0
iface eno1:0 inet static
address 192.168.0.102
netmask 255.255.255.0
I moved Apache to that IP
ports.conf
Listen 192.168.0.102:80
And now Apache sees me ad 10.8.0.6 no matter if im connecting from WAN or LAN side. This is weird because it should work that way without additional interface. Afterall Apache is on eno1 (default) interface so it has 192.168.0.101 address and OVPN client is from tun0 interface.
Is it a bug or i dont understand something?