Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 11-28-2012, 01:05 AM   #1
LQ Newbie
Registered: Nov 2012
Posts: 12

Rep: Reputation: Disabled
Can't add a Port address translation rule

Hi All,

I try since two days to redirect traffic coming in a port to another address and port, the problem is that iptables returns me :
iptables: No chain/target/match by that name.
I use linux kernel 2.6.39
iptables version iptables v1.4.12

here the rules
iptables -v -t nat -D PREROUTING -p tcp --dport 80 -j DNAT --to-dest
DNAT  tcp opt -- in * out *  ->   tcp dpt:80 to:
iptables: No chain/target/match by that name.
Does any one Know which option I have to activate in the kernel to resolve this ?

Thank you

Last edited by Tekiano; 11-28-2012 at 01:11 AM.
Old 11-28-2012, 04:00 AM   #2
Senior Member
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 315Reputation: 315Reputation: 315Reputation: 315
Option "-D" means to delete specific rule, you want to use option "-I PREROUTING" or "-A PREROUTING" to add new rule. Remember also to enable forwarding on this machine, by for example:
echo 1 > /proc/sys/net/ipv4/ip_forward

Last edited by eSelix; 11-28-2012 at 04:05 AM.
1 members found this post helpful.
Old 11-28-2012, 04:43 AM   #3
LQ Newbie
Registered: Nov 2012
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thank you eSelix, this fixes my problem.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables can't port forward (PAT Port address translation) sfrederiksen Linux - Networking 7 12-20-2011 10:47 AM
IPTABLES PORT TRANSLATION / REDIRECT to a different address daveginorge Linux - Newbie 2 05-07-2010 01:59 PM
Need help implementing Port Address Translation with iptables Ashmatash Linux - Networking 4 02-04-2010 10:11 PM
Test if port address translation is working dales79 Linux - Security 1 01-17-2006 07:01 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:16 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration