Iptables not create rules

Protecting your Linux box
majidnazeer
Naik
Posts: 60
Joined: Wed Oct 05, 2005 12:37 pm

Iptables not create rules

Postby majidnazeer » Sat Oct 21, 2006 3:54 pm

Hi all!

I try to create rule by iptables. Command successfully run, but that rule not show in list.

# iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

when i check iptables list by iptables -L command. doen't have any entry. Anybody know how to solve this problem.

Thanks
Majid

lambda
Major General
Posts: 3452
Joined: Tue May 27, 2003 7:04 pm
Location: Lahore
Contact:

Postby lambda » Sat Oct 21, 2006 4:40 pm

read the documentation for iptables carefully. you need to do "iptables -t nat -L" to see the rules in the nat table.

asim.mcp
Cadet
Posts: 4
Joined: Tue Aug 29, 2006 2:45 am

Postby asim.mcp » Sun Oct 22, 2006 7:21 pm


LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Mon Oct 23, 2006 7:46 am

Farrukh Ahmed

majidnazeer
Naik
Posts: 60
Joined: Wed Oct 05, 2005 12:37 pm

Iptables not create rules

Postby majidnazeer » Fri Oct 27, 2006 10:00 am


LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Sun Oct 29, 2006 10:19 am

Dear majidnazeer,
Salam,

As i have told you in my last reply that you need to specify -t.

# iptables -t nat -L -n --line

Best Regards.
Farrukh Ahmed

A Ahmed
Cadet
Posts: 3
Joined: Thu Nov 23, 2006 3:07 pm
Location: Lahore. Pakistan
Contact:

Postby A Ahmed » Sat Nov 25, 2006 12:31 am

Salam,
Dear Sir i am new in linux. i want to learn about linux for saving money who i give that person who solve my problem plz tell me any way where i study and knowledged about linux.
Regard
Adnan Ahmed

kbukhari
Major General
Posts: 1222
Joined: Sat Dec 31, 2005 12:29 am
Location: Lahore
Contact:

Postby kbukhari » Sat Nov 25, 2006 1:16 am

--
Syed Kashif Ali Bukhari
+92-345-8444420
http://sysadminsline.com
http://kashifbukhari.com

LinuxFreaK
Site Admin
Posts: 5132
Joined: Fri May 02, 2003 10:24 am
Location: Karachi
Contact:

Re:

Postby LinuxFreaK » Mon Nov 27, 2006 9:14 am

Farrukh Ahmed


Return to “Security”

Who is online

Users browsing this forum: No registered users and 2 guests