Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently installed openvpn on CentOS 6 64bit and everything is working fine but I want to portforward a client "user" so they can use that port. Here is what I thought it should work

iptables -t nat -A PREROUTING -p udp -d SERVERIP --dport 3074 -j DNAT --to-destination

After running that command the firewall output is this

[root@RUVPN ~]# iptables -L -n 
Chain INPUT (policy ACCEPT) target prot opt source destination 
ACCEPT all -- ACCEPT all -- 
ACCEPT all -- ACCEPT all --

Chain FORWARD (policy ACCEPT) target prot opt source destination
ACCEPT all --

Chain OUTPUT (policy ACCEPT) target prot opt source destination

What have I done wrong?

share|improve this question
That should work. What's your question? – SmallClanger Feb 20 '13 at 13:46
Issue iptables -t nat -n -L -v and you will see your rule added to PREROUTING chain of nat table. – slimsuperhero Feb 20 '13 at 14:31
# iptables -t nat -n -L -v Chain PREROUTING (policy ACCEPT 29 packets, 1218 bytes) pkts bytes target prot opt in out source destination 0 0 DNAT tcp -- * * tcp dpt:33891 to: 0 0 DNAT udp -- * * – Spetsnaz Feb 20 '13 at 18:21

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.