My openvpn share the 443 port with nginx, so when a request on that port is not a openvpn protocol, openvpn redirects to port 11443 where nginx is listening.
port 443
port-share localhost 11443
...
verb 3
log-append /var/log/openvpn.log
i.e. (using fake IP 1.2.3.200 and 3.4.5.100):
In the router (only 443 are opened) I can see something like:
redirecting port 443 from 1.2.3.200 to 192.168.1.2
In openvp log:
TCP connection established with [AF_INET]1.2.3.200:40767
1.2.3.200:40767 Non-OpenVPN client protocol detected
1.2.3.200:40767 SIGTERM[soft,port-share-redirect] received, client-instance exiting
And nginx the connection apear as 127.0.0.1
But so many times I have logs in nginx showing 127.0.0.1 connections that are not in openvpen logs.
In the router I can see somthing like:
redirecting port 443 from 3.4.5.100 to 192.168.1.2
In openvpn log nothing about 3.4.5.100
In nginx there is a connection from 127.0.0.1
I added a iptables LOG for port 443 and I can see 1.2.3.200 and 3.4.5.100 connections.
Why 3.4.5.100 is not in openvpn.log?
Any clues?