3
1
I'm having a similar problem to this: OpenVPN without NAT
Seems it wasn't answered yet.
Description of my situation: I have an openvpn server on network A which another admin installed before he left the company, now several users and servers connect to that openvpn server to access network A and get NATed so all requests from vpn users/servers have the source address from the openvpn server.
Now I need a server on network A to access one of the openvpn clients/servers and want to disable NAT in openvpn to expose the "vpn internal" IP addresses of these clients and servers.
I know that I need to add a route on Network A to access the vpn network, that's clear to me but I cannot see how to disable NAT in openvpn, also there are no IPtables rules present so some openvpn internal NAT mechanism seems to be in use.
Which options I need to check to disable NAT?
As I said there are no IPtables rules present on the openvpn server.
I monitored network traffic using tcpdump on the openvpn server, when looking at the tun device of openvpn, I can see traffic from source address of the vpn-client tunnel IP and destination IP is on network A.
When looking at the network A interface of the vpn server, I can see the same packets with source IP of the openvpn server instead of the tunnel-ip of that vpn user.
Any ideas which parameter to check? – Hans – 2015-09-17T14:50:40.667
@Hans Have you looked at the output of
iptables -t nat -L -n -v
on the OpenVPN server? – MariusMatutiae – 2015-09-17T15:35:51.023@Hans Pls re-read my post for new info. – MariusMatutiae – 2015-09-17T16:06:29.183
1Thank you, I did not check iptables -t nat -L -n -v, only iptables -L (as I do usually) and it did not show the nat table (-t nat).
Now I found that rule which was present, then I searched in /etc where this is configured and found that the guy added it to /etc/rc.local
I removed the nat rule (iptables -t nat -F) and now tcpdump shows the traffic as expected :) – Hans – 2015-09-17T20:02:53.343