I have server with Ubuntu 20.04 and installed and working IKEv2 VPN with Strongswan.
And i have one php system (installed on the same server with the VPN), that is locked by IP. So i'm using my VPN to get inside with my IP. (Yes i've added the VPN local addresses)
The problem is that $_SERVER['REMOTE_ADDR']
is NOT showing my VPN IP,
But is showing my mobile operator IP. It's like it doesn't matter that i'm with VPN or without.
I really can't figure out what's wrong. I've tried to remove the DNS's but in this way the VPN is not working. Does someone know how to fix this issue?
Here is the ipsec.conf:
config setup
charondebug="ike 1, knl 1, cfg 0"
uniqueids=no
conn ikev2-vpn
auto=add
compress=no
type=tunnel
keyexchange=ikev2
fragmentation=yes
forceencaps=yes
ike=aes256-sha1-modp1024,3des-sha1-modp1024!
esp=aes256-sha1,3des-sha1!
dpdaction=clear
dpddelay=300s
rekey=no
left=%any
leftid=@example.com
leftsubnet=0.0.0.0/0
#leftauth=eap
#eap_identity=username
right=%any
rightid=%any
rightdns=8.8.8.8,8.8.4.4
rightsourceip=10.10.10.0/24
authby=secret