LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-17-2011, 05:16 AM   #1
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Rep: Reputation: 1
iptable rule


Hi

I have centos 5.3 installed , i want to add rule as

iptables -A POSTROUTING -d 192.168.1.3 -j MASQUERADE

it shows error as no chain /target match by that name


Amar
 
Old 12-17-2011, 06:08 AM   #2
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
By default, if no table is specified, iptables assumes the filter table.
There is no postrouting chain, in the filter table. Thats why your getting the error.

So you need to specify the nat table, for PRE/POSTROUTING rules
Code:
iptables -t nat -A POSTROUTING -d 192.168.1.3 -j MASQUERADE
 
1 members found this post helpful.
Old 12-18-2011, 11:36 PM   #3
amartlk
Member
 
Registered: Sep 2010
Location: Nagpur India
Posts: 347

Original Poster
Rep: Reputation: 1
Hi

Thanks for solved my issue
 
  


Reply


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
iptable how many rule iptable can manage toure32 Linux - Networking 1 05-13-2010 05:34 AM
iptable rule vinaytp Linux - Newbie 1 10-26-2009 02:39 AM
Same Iptable rule to be avoided? Santoshkb Linux - Networking 2 12-21-2007 06:55 AM
complex iptable rule help farhan Linux - Security 2 08-31-2005 10:58 PM
iptable rule for rmi bijuhpd Linux - Newbie 2 04-27-2005 01:42 AM


All times are GMT -5. The time now is 03:12 PM.

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