iptables port mapping ANY:95 to originalIP:80

I'm using my linux box as a router and I have an application that is make all the request in port 95.
I need to make an iptables rule that will change the original port of any destination ip addres to 80.
I know how to do it for a specific destination ip but I could not find the way to do it for any destination ip.

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 95 -j DNAT --to is the Google ip, but I need the rule to work for any ip. Something like:

iptables -t nat -A PREROUTING -i eth0 -p tcp -d ANY --dport 95 -j DNAT --to ANY:80

I know that it is possible to do in checkpoint firewall but it is a little expensive...
Who is Participating?
PAQed with points refunded (250)

Community Support Moderator
i have this in my iptables

iptables -t nat -A PREROUTING  -p tcp -d  --dport 81 -j DNAT  --to
iptables -t nat -A PREROUTING  -p tcp -d  --dport 82 -j DNAT  --to
e_bergAuthor Commented:
This is not what I need.
I need to make something more generic.
Not for a specifics ip.
Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

replace -d for

-d 0/0
e_bergAuthor Commented:
This will not work.
I found it.  It mast be:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 95 -j DNAT --to-destination :80
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.