I really could use a little help. While I can follow guides and have a simple grasp of what's going on, I need a little hand holding.
We have a development network we are currently using openvpn on an old clark connect instance and I'm trying to update things.
I've got a Cent 6 VM built off of most of the NSA guidelines and am now configuring openvpn.
My core question is what config do I really want?
The current one has a single interface that forwards traffic back out with the client IP. As in:
INTERNET
|
FIREWALL - DMZ
| |
LAN PROXY
| |
OPENVPN <----
So the proxy forwards VPN traffic to the server. LAN is on 192.168.10.0 the VPN clients are 192.168.50.0. When the traffic comes out of the VPN box, the IP is of the client, not the server.
What I'm looking to do is:
INTERNET
|
FIREWALL - DMZ
| |
LAN OPENVPN
The part I'm not sure about is how to connect VPN to the LAN. Do I put a second interface on the VPN box connected to the LAN or do I use a similar concept as I have now where the traffic of the clients coming out of the VPN is different and I route it through the firewall from the DMZ to LAN?
Right now what I have working is with the new layout with a single interface but traffic coming out is still from the server's IP, not the client so the firewall is blocking it.
Sever config (minus key locations and such)
local 192.168.90.9
port 1194
proto udp
dev tun
server 192.168.50.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 192.168.10.6"
push "route 192.168.10.0 255.255.255.0"
#client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
status openvpn-status.log
log-append /var/log/openvpn.log
verb 6
mute 10
script-security 3
auth-user-pass-verify /etc/openvpn/auth/openvpn-super.pl via-env
client-connect /etc/openvpn/auth/openvpn-super.pl
auth-nocache
cipher AES-256-CBC
auth SHA512
opt-verify
I've set /proc/sys/net/ipv4/ip_forward to 1 and with an iptables rule forwarding tun0 to eth0 I get traffic trying to hit a test server for an ssh session but again the traffic to the firewall looks like the VPN server, not the client itself.
iptables -I FORWARD -i eth0 -o tun0 -j ACCEPT
iptables -I FORWARD -i tun0 -o eth0 -j ACCEPT
I realize this is a 2 part question but I'm stuck and am not sure what is the best way to proceed. I don't really care which is easier, I want the better solution. Do I stick with what I've got above and we figure out my forwarding problem or do we add a new interface and then fix forwarding and/or switch to bridged mode?
One thing that is nice about having the client IPs coming out of the server is if I can create a custom connection script to set specific IPs and to push routes to say the management network and then allow only those IPs through at the firewall.
Thanks for your time.