Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to forward internal packets to outside without success.

iptables -t nat -A PREROUTING -i eth0 -p icmp -d "internal IP" -j DNAT --to-destination "external IP"
iptables -t nat -A PREROUTING -i eth0 -p icmp -d -j DNAT --to-destination

PING ( 56(84) bytes of data.
From icmp_seq=1 Destination Host Unreachable

Can I forward virtual IP address which doesn't exist?

iptables -t nat -A PREROUTING -i eth0 -p icmp -d 192.168.1.? -j DNAT --to-destination


share|improve this question
Where are you running the ping command from? The same computer where you have the iptables running? If that is the case, then those packets won't go through PREROUTING chain. Locally generated packets use the OUTPUT chain in the nat table. –  Tero Kilkanen May 4 '14 at 0:03

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.