doublemax
Hello,
Two machines (both CentOS), connected via OpenVPN:
a) "Webserver"
b) "Tunnel"
Requests to "Tunnel" (port 80) are tunneled to "Webserver" (port 80). "Tunnel" does not use "masquerade", because I want to see the real ip-addresses in the server-log of "Webserver".
My problem:
Is it possible to distinguish packets received directly and packets received via the tunnel?
IP-packets received from the openvpn-tunnel should be sent back to the tunnel.
IP-packets received directly should be routed to the default gateway.
Thanks a lot
Marcus
Mimiko
This is not related to OpenVPN directly, but rather to ability to configure routing on the webserver. In order for the webserver to be able to distinguish the interface source, the service must be aware of MARKed packets. So, packets comming from the lan interface will be MARK-ed for example with 1, and packets comming from the VPN will be marked with 2. The web service must respond back with packets having same MARK number, so using iptables this packets can be routed correctly back.
Also you can setup two web services, each one will leasten to different interface.