I love serverfault, I have learned quite a bit from this website. Hopefully I can learn one more thing.
OpenVPN Server has 30 Static WAN IP's each one has 1 user on it. Plus there is a main IP address they use to connect to the server
User on the static IP eth0:5 wants his static WAN IP to accept incoming connections.
- Current configuration allows incoming connections on eth0 only. Not eth0:5
I need to get his IP accepting incoming connections instead of the OpenVPN servers main IP
port 443 #- port proto tcp #- protocol dev tun tun-mtu 1500 tun-mtu-extra 32 mssfix 1450 ca /etc/openvpn/easy-rsa/2.0/keys/ca.crt cert /etc/openvpn/easy-rsa/2.0/keys/server.crt key /etc/openvpn/easy-rsa/2.0/keys/server.key dh /etc/openvpn/easy-rsa/2.0/keys/dh1024.pem plugin /etc/openvpn/radiusplugin.so /etc/openvpn/radiusplugintcp.cnf client-cert-not-required username-as-common-name server 10.9.0.0 255.255.255.0 push "redirect-gateway def1" push "dhcp-option DNS 220.127.116.11" push "dhcp-option DNS 18.104.22.168" keepalive 5 30 comp-lzo persist-key persist-tun verb 4 reneg-sec 0 client-config-dir /etc/openvpn/ccd
Current IP Tables
-A POSTROUTING -s 10.9.0.13/32 -o eth0 -m comment --comment "firstname.lastname@example.org" -j SNAT --to-source 22.214.171.124 -A POSTROUTING -s 10.9.0.0/24 -o eth0 -j MASQUERADE
Here are the commands I am using currently. These work but the incoming traffic has to point to the OpenVPN Server's static WAN IP instead of the users static WAN IP
iptables -t nat -A PREROUTING -p tcp --dport 9898 -j DNAT --to-destination 10.9.0.13 iptables -A FORWARD -s 10.9.0.13 -p tcp --dport 9898 -j ACCEPT
Any help would be awesome!