Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
push "redirect-gateway def1"
push "dhcp-option DNS"
push "dhcp-option DNS"
keepalive 5 30
verb 4
reneg-sec 0
client-config-dir /etc/openvpn/ccd

Current IP Tables

-A POSTROUTING -s -o eth0 -m comment --comment "dave@smrhosting.com" -j SNAT --to-source

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
iptables -A FORWARD -s -p tcp --dport 9898 -j ACCEPT

Any help would be awesome!

share|improve this question
Could you please try to rephrase the question a bit? I tried to re-read it several times but failed to comprehend what is actually required. Usually creating a bulleted list of simple sentences each stating one fact helps. –  kostix Mar 19 '13 at 10:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.