LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS
User Name
Password
CentOS This forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.

Notices


Reply
  Search this Thread
Old 08-10-2015, 03:01 PM   #1
andalogokct
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Rep: Reputation: Disabled
Linux Firewall - (rpm package lacks the NAT/MANGLE table.)


Centos 6.5 32bit.

Hi guys, the issue here is that it only has the FILTER table.

I type the command as followed:

#rpm -qa | grep iptables
and it downloads nicely..
iptables-1.4.7-16.el6.i686
iptables-ipv6-1.4.7.16.el6.i686

but..

It only appears the iptable_fitler in the iptables package.

That's it, it lacks the NAT and MANGLE tables(I just need these two), How I GET THEM ?(On preference, it can be the full package too, the one that has all 5 tables.)


Thanks.

Last edited by andalogokct; 08-10-2015 at 03:02 PM.
 
Old 08-10-2015, 05:16 PM   #2
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,627

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
Quote:
#rpm -qa | grep iptables
and it downloads nicely..
iptables-1.4.7-16.el6.i686
iptables-ipv6-1.4.7.16.el6.i686
the command "rpm -qa ????? "
dose NOT download ANYTHING

please READ the manual for rpm

all that command dose is give a alphabetical list of things that have "iptables" in the name
OF THINGS ALREADY INSTALLED

also DO NOT instal/ uninstall packages with RPM

yum was implemented 8 YEARS AGO to do that

and be advised centos6.5 has been UNSUPPORTED for a year

Cent only supports the current minor version

that is CentOS 6.7

please check your version
Code:
cat /etc/redhat-release
if it dose not state it is 6.7
upgrade ASAP
 
Old 08-10-2015, 05:48 PM   #3
andalogokct
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Yes, it is in fact 6.7 (Final Release).


I dont know what's happening, yum is already installed and upgraded and my Iptables packages still has only iptables_filter... I still hold the question "how do I get them"..

---------- Post added 08-10-15 at 05:48 PM ----------

Quote:
Originally Posted by John VV View Post
the command "rpm -qa ????? "
dose NOT download ANYTHING

please READ the manual for rpm

all that command dose is give a alphabetical list of things that have "iptables" in the name
OF THINGS ALREADY INSTALLED

also DO NOT instal/ uninstall packages with RPM

yum was implemented 8 YEARS AGO to do that

and be advised centos6.5 has been UNSUPPORTED for a year

Cent only supports the current minor version

that is CentOS 6.7

please check your version
Code:
cat /etc/redhat-release
if it dose not state it is 6.7
upgrade ASAP
Yes, it is in fact 6.7 (Final Release).


I dont know what's happening, yum is already installed and upgraded and my Iptables packages still has only iptables_filter... I still hold the question "how do I get them"..
 
Old 08-11-2015, 06:38 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
@John VV: don't only gripe and whine, do try to answer the actual question there, OK?
 
Old 08-11-2015, 10:17 PM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Exactly what command are you running when you see a FILTER table and nothing else? The iptables package does not contain any rule sets. Those are something you either create manually or with one of the available firewall builders, such as the basic system-config-firewall, or shorewall, or any of a number of 3rd party tools.
 
1 members found this post helpful.
Old 08-11-2015, 11:20 PM   #6
andalogokct
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols View Post
Exactly what command are you running when you see a FILTER table and nothing else? The iptables package does not contain any rule sets. Those are something you either create manually or with one of the available firewall builders, such as the basic system-config-firewall, or shorewall, or any of a number of 3rd party tools.
#:iptables -vnL; #:service iptables status, the command says itself shows only the status of the filter table,

Also #:lsmod | grep less, lsmod | grep tables; show that I have only 1 table in the iptables package which is the filter table.

the fact is that either dont have the nat/mangle table or they must be somewhere else I dont know.

Last edited by andalogokct; 08-11-2015 at 11:53 PM.
 
Old 08-12-2015, 08:46 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
"iptables -vnL" defaults to "-t filter", reporting only the filter table. If you want to see one of the other tables, you have to ask: "iptables -t nat -vnL", or "iptables -t mangle -vnL". The output from "service iptables status", does not show any tables that contain no rules. Does your /etc/sysconfig/iptables have any rules for those tables?
 
1 members found this post helpful.
Old 08-12-2015, 09:16 AM   #8
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,748
Blog Entries: 11

Rep: Reputation: 233Reputation: 233Reputation: 233
Use iptables-save to get a full list of all set iptables. Can also be used to save to a file and load later with iptables-apply. This is also faster than doing a lot of iptables -A lines

To rest asured you definitely have all four tables. Even a fifth with SELinux. Also they only get loaded once you ask the kernel about it. So a simple iptables -t mangle -L will show them. Go figure.

After a clean boot with no iptables setup do
Quote:
iptables-save #shows nothing
iptables -t mangle -L # lists only the five emtpy chains
iptables-save #show mangle and filter table
Same goes for lsmod | grep iptables

@unspawn your post is not helping either.
 
1 members found this post helpful.
Old 08-12-2015, 09:42 AM   #9
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
And just to clarify, the filter tables and the code to apply them are part of the kernel. You have those regardless of whether the "iptables" package is installed. That package is just the userspace tools to manage the tables that are in the kernel.
 
1 members found this post helpful.
Old 08-12-2015, 03:04 PM   #10
andalogokct
LQ Newbie
 
Registered: Aug 2015
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by zhjim View Post
To rest asured you definitely have all four tables. Even a fifth with SELinux. Also they only get loaded once you ask the kernel about it. So a simple iptables -t mangle -L will show them. Go figure.
PERFECT! That's why whenever I ran the command "#:service iptables status" I didn't get anything.. same for "#:lsmod | less". Now I can view them, it's working fine.


the difference with "#:iptables -vnL" is that it only shows the default which is the filter table SINCE no rules is applied to NAT/MANGLE.

thanks a lot for helping me

Last edited by andalogokct; 08-12-2015 at 03:07 PM.
 
Old 08-12-2015, 05:00 PM   #11
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,783

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
Quote:
Originally Posted by andalogokct View Post
the difference with "#:iptables -vnL" is that it only shows the default which is the filter table SINCE no rules is applied to NAT/MANGLE.
Even if there are rules in the "nat" or "mangle" tables, "iptables -L" still defaults to showing only the filter table. If you want to see the others, you have to ask.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi-WAN Problem with IPROUTE2/IPTABLES - Packets disappear between MANGLE & NAT alpharomeo31 Linux - Kernel 2 10-18-2011 09:12 AM
LINUX NAT firewall configuration using IPTables HELP slugman92 Linux - Newbie 1 02-21-2011 04:58 AM
Meanings of IPTABLES mangle table mosharaf_linux Linux - Server 1 02-14-2011 06:53 AM
Make Linux act as a internet router (NAT table) with Web content filtering Aleks` Linux - Server 3 03-19-2009 09:45 AM
Mangle Table santhosh23 Linux - General 2 06-24-2007 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > CentOS

All times are GMT -5. The time now is 03:10 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
Open Source Consulting | Domain Registration