LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-08-2008, 01:12 AM   #1
apulu
Member
 
Registered: Feb 2008
Posts: 40

Rep: Reputation: 15
how to configure iptables..?


hi all..
I am new to firewall and iptables..

I am using embedded system(ARM).linux kernel is 2.4.18..

Can anyone tell me how to configure iptables for my embedded system..?

Thank you ..
 
Old 02-08-2008, 01:35 AM   #2
apulu
Member
 
Registered: Feb 2008
Posts: 40

Original Poster
Rep: Reputation: 15
when I tried this command in my system..

[root@INNOVATE /]$iptables -F
modprobe: Can't locate module ip_tables
iptables v1.2.9: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Can anyone help me regarding this??

Thank you..
 
Old 02-08-2008, 06:32 AM   #3
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
What happens if you modprobe that module?
Code:
modprobe ip_tables
 
Old 02-08-2008, 07:58 AM   #4
gundelgauk
Member
 
Registered: Jul 2003
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Your 2.4 kernel possibly uses the slightly older ipchains instead of iptables. The usage is somewhat similar but still slightly different. But there are lots of good howtos for that as well.
 
Old 02-08-2008, 08:14 AM   #5
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by gundelgauk View Post
Your 2.4 kernel possibly uses the slightly older ipchains instead of iptables. The usage is somewhat similar but still slightly different. But there are lots of good howtos for that as well.
Anything is possible, but that would be really weird. ipchains is what Linux 2.2 used - not Linux 2.4.
 
Old 02-08-2008, 08:32 AM   #6
gundelgauk
Member
 
Registered: Jul 2003
Distribution: Gentoo
Posts: 168

Rep: Reputation: 30
Oh, that may be possible. I could have sworn that ipfwadm is what 2.2 used and ipchains was introduced with 2.4 but I seem to have confused things. Sorry.
 
Old 02-08-2008, 10:18 PM   #7
apulu
Member
 
Registered: Feb 2008
Posts: 40

Original Poster
Rep: Reputation: 15
I used modprobe command..

[root@INNOVATE /root]$modprobe ip_tables
modprobe: Can't locate module ip_tables


Is that problem with iptable versions or something else..??What is the next step I can take..??

When I tried to flush iptables..I got..

[root@INNOVATE /root]$iptables -F
modprobe: Can't locate module ip_tables
iptables v1.2.8: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

Thank you..

Last edited by apulu; 02-08-2008 at 11:25 PM.
 
Old 02-09-2008, 12:26 AM   #8
apulu
Member
 
Registered: Feb 2008
Posts: 40

Original Poster
Rep: Reputation: 15
What is the next step I can take..????Can anyone help me??

Thank you..
 
Old 02-09-2008, 02:22 AM   #9
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by apulu View Post
[root@INNOVATE /root]$modprobe ip_tables
modprobe: Can't locate module ip_tables
Not sure, but it sounds like you'll need to recompile your kernel/modules, making sure that you have properly enabled Netfilter/iptables support in the config. FWIW, here's a glimpse at what one of my 2.4 configs looks like:
Code:
win32sux@candystore:~$ cat config-2.4.36 | grep NF_
CONFIG_IP_NF_CONNTRACK=m
CONFIG_IP_NF_FTP=m
CONFIG_IP_NF_AMANDA=m
CONFIG_IP_NF_TFTP=m
CONFIG_IP_NF_IRC=m
CONFIG_IP_NF_IPTABLES=m
CONFIG_IP_NF_MATCH_LIMIT=m
CONFIG_IP_NF_MATCH_MAC=m
CONFIG_IP_NF_MATCH_PKTTYPE=m
CONFIG_IP_NF_MATCH_MARK=m
CONFIG_IP_NF_MATCH_MULTIPORT=m
CONFIG_IP_NF_MATCH_TOS=m
CONFIG_IP_NF_MATCH_RECENT=m
CONFIG_IP_NF_MATCH_ECN=m
CONFIG_IP_NF_MATCH_DSCP=m
CONFIG_IP_NF_MATCH_AH_ESP=m
CONFIG_IP_NF_MATCH_LENGTH=m
CONFIG_IP_NF_MATCH_TTL=m
CONFIG_IP_NF_MATCH_TCPMSS=m
CONFIG_IP_NF_MATCH_HELPER=m
CONFIG_IP_NF_MATCH_STATE=m
CONFIG_IP_NF_MATCH_CONNTRACK=m
CONFIG_IP_NF_FILTER=m
CONFIG_IP_NF_TARGET_REJECT=m
CONFIG_IP_NF_NAT=m
CONFIG_IP_NF_NAT_NEEDED=y
CONFIG_IP_NF_TARGET_MASQUERADE=m
CONFIG_IP_NF_TARGET_REDIRECT=m
CONFIG_IP_NF_NAT_AMANDA=m
CONFIG_IP_NF_NAT_IRC=m
CONFIG_IP_NF_NAT_FTP=m
CONFIG_IP_NF_NAT_TFTP=m
CONFIG_IP_NF_MANGLE=m
CONFIG_IP_NF_TARGET_TOS=m
CONFIG_IP_NF_TARGET_ECN=m
CONFIG_IP_NF_TARGET_DSCP=m
CONFIG_IP_NF_TARGET_MARK=m
CONFIG_IP_NF_TARGET_LOG=m
CONFIG_IP_NF_TARGET_ULOG=m
CONFIG_IP_NF_TARGET_TCPMSS=m
CONFIG_IP_NF_ARPTABLES=m
CONFIG_IP_NF_ARPFILTER=m
CONFIG_IP_NF_ARP_MANGLE=m
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
win32sux@candystore:~$
Once you'e recompiled your kernel/modules, proceed to boot them and then recompile iptables.
 
Old 02-13-2008, 04:26 AM   #10
apulu
Member
 
Registered: Feb 2008
Posts: 40

Original Poster
Rep: Reputation: 15
Sorry for late reply..

I have recompiled my kernel..Iptable support in netfilter configuration was not enabled..now I enable that..below is the current netfilter config..
---------------------------------------------
# IP: Netfilter Configuration
#
# CONFIG_IP_NF_CONNTRACK is not set
# CONFIG_IP_NF_QUEUE is not set
CONFIG_IP_NF_IPTABLES=m
# CONFIG_IP_NF_MATCH_LIMIT is not set
# CONFIG_IP_NF_MATCH_MAC is not set
# CONFIG_IP_NF_MATCH_MARK is not set
# CONFIG_IP_NF_MATCH_MULTIPORT is not set
# CONFIG_IP_NF_MATCH_TOS is not set
# CONFIG_IP_NF_MATCH_AH_ESP is not set
# CONFIG_IP_NF_MATCH_LENGTH is not set
# CONFIG_IP_NF_MATCH_TTL is not set
# CONFIG_IP_NF_MATCH_TCPMSS is not set
# CONFIG_IP_NF_MATCH_UNCLEAN is not set
# CONFIG_IP_NF_MATCH_OWNER is not set
CONFIG_IP_NF_FILTER=m
# CONFIG_IP_NF_TARGET_REJECT is not set
# CONFIG_IP_NF_TARGET_MIRROR is not set
# CONFIG_IP_NF_MANGLE is not set
# CONFIG_IP_NF_TARGET_LOG is not set
# CONFIG_IP_NF_TARGET_ULOG is not set
# CONFIG_IP_NF_TARGET_TCPMSS is not set
# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-----------------------------------------
Is it necessory to add other options also..??(as your config file?)
I have booted my board again..
Can you tel me how to recompile iptables..?


Thank you..

Last edited by apulu; 02-13-2008 at 04:30 AM.
 
Old 02-13-2008, 05:18 AM   #11
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by apulu View Post
Is it necessory to add other options also..??(as your config file?)
No, the only necessary options are the ones you need.

Quote:
I have booted my board again..
Can you tel me how to recompile iptables..?
The iptables tarball includes an INSTALL file with instructions.
 
Old 02-13-2008, 10:18 PM   #12
apulu
Member
 
Registered: Feb 2008
Posts: 40

Original Poster
Rep: Reputation: 15
U mean to say I have to install iptables again..??

Thank you..
 
Old 02-13-2008, 10:21 PM   #13
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by apulu View Post
U mean to say I have to install iptables again..??
Yes, you recompile it so that the binaries will match your kernel's new configuration - then you install it.
 
Old 02-13-2008, 10:45 PM   #14
apulu
Member
 
Registered: Feb 2008
Posts: 40

Original Poster
Rep: Reputation: 15
Sorry for my very basic questions..I am new to this..

How to recompile iptables.?Where I will get its source.?

Is iptables are necessory for ssh..??

Thank you..
 
Old 02-14-2008, 10:43 AM   #15
win32sux
LQ Guru
 
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870

Rep: Reputation: 380Reputation: 380Reputation: 380Reputation: 380
Quote:
Originally Posted by apulu View Post
Sorry for my very basic questions..I am new to this..

How to recompile iptables.?Where I will get its source.?
At the iptables Web page.

Once again, instructions are in the INSTALL file.

Quote:
Is iptables are necessory for ssh..??
No.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Configure iptables through webmin kitek Linux - Security 13 04-24-2007 11:22 PM
how to configure iptables santhosh.linux Linux - Security 2 09-27-2006 10:52 AM
how to configure iptables for nfs ?? dansawyer Linux - Security 4 08-06-2006 11:32 PM
Need help to install/configure iptables Gaucho Slackware 10 02-20-2006 01:23 AM
How to configure iptables for VMWare? Thoddy Linux - Networking 2 01-26-2004 04:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:50 AM.

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