Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Systems > Linux / BSD / OS X
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 02-23-2005, 09:01 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
iptables - debian 2.4 kernel broken

Quote:
# uname -a
Linux myhost 2.4.26-bf2.4 #1 SMP Wed May 26 08:34:11 PDT 2004 i686 GNU/Linux
Quote:
# iptables -L
modprobe: Can't locate module ip_tables
iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
i've ran a dist-upgrade already, but i can not get iptables to work. ideas how i can make it work? i got major problems on our game server. all these ports are somehow magically opened including an ms-sql port( wtf? )
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 02-23-2005, 11:02 AM   #2 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 595
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
Did you upgrade your kernel recently?
First try modprobe ip_tables.
If that fails, make sure you have the source for your kernel installed, a symlink called /usr/src/linux should point there. As root cd to that directory and run 'make menuconfig' a curses interface will open up in the terminal. Use the arrow keys and spacebar to navigate to the category Networking Options. Hit M to activate IP Advanced Router and then move to the category Netfilter configuration and select Connection Tracking and IP Tables Support. After that hit escape until it asks you if you want to save your configuration, hit yes. Then enter the command 'make dep && make modules modules_install' Then try running modprobe again.
__________________
teknomage1 is offline   Reply With Quote
Old 02-23-2005, 11:32 AM   #3 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
i did upgrade the kernel a couple months ago to 2.4.

the modprobe ip_tables failed, and i don't have /usr/src/linux

i did the upgrade through apt-get .. maybe i blew past the iptables setting when i did.

the main problem is that i have all these ports showing up as open on a port scan ( 64.27.21.2 ) and i verified that none of those services are in fact running. i don't know how they got open. this is a game server with a couple people accessing it, so it was probably someone's doing.

is there any other way to patch this up?
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 02-23-2005, 12:42 PM   #4 (permalink)
teknomage1
Jack of all trades
 
teknomage1's Avatar
 
Join Date: Feb 2005
Location: Los Angeles
Posts: 595
teknomage1 is on a distinguished road
Send a message via AIM to teknomage1
Well if modprobe is failing, it means your kernel is currently lacking ip tables support. I haven't used debian but I assume you can either download a kernel with iptables built in or download the kernel source and follow the steps above.
__________________
teknomage1 is offline   Reply With Quote
Old 02-23-2005, 10:53 PM   #5 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
All the ports that are showing as opened, could be falsely reported, if inetd is running. It is a service routing incomming connections to a given software depending on the accessed port number.
As default it will monitor all well known ports such as nfs/smbfs/ping/telnet/etc. Altho there are currently no active program listening on the specified port, a portscan will reveal it as open.

How ever, given the fact, that you are gettign a report on missing the ip_tables module I would think the case is more likely to be a failing firewall.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-24-2005, 06:47 AM   #6 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
i hosed it.

i tried to re-compile the kernel ( tekno helped me understand a lot over aim, thanks again! ) .. but toward the end i forgot to run lilo before i restarted the server.

it boots up to just li which means the MBR is screwed up. server is co-located and i have no boot disk.

it seems like debian is real picky about being re-compiled because i've tried to do this before and got the same thing.

the ONLY thing common between both instances where i tried to re-compile the kernel is that i didn't know to run lilo the first time, .. and the last time i forgot.

an admin at the data center is going to try to recover it today, .. but i'm not holding my breath.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 02-24-2005, 07:13 AM   #7 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
Should be fairly easy to recover, just boot with any boot disk, then chroot to the place you've mounted root under, and run lilo from there, reboot and you're back up on the new kernel.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-25-2005, 03:38 PM   #8 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
ok, so we got the server back up, but it is very strange.

i have /boot/vmlinuz sym linked to the new 2.4.27 kenrel. /boot/vmlinuz.old linked to the 2.4.26 kernel.

we were able to get the server back up, but it is still booting to the old kernel even though 2.4.27 is what /boot/vmlinuz is linked to.

any ideas?
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 02-25-2005, 10:33 PM   #9 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
when i run uname -a , where is it pulling this information from? i re-compiled again ( successfully this time ) , but uname still shows me at the 2.4.26 kernel.

even though i enabled iptables in the config, i still get this when i try to run iptables:
Quote:
# iptables -L
modprobe: Can't locate module ip_tables
iptables v1.2.11: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Old 02-26-2005, 10:37 AM   #10 (permalink)
redhead
Newbie
 
redhead's Avatar
 
Join Date: Jun 2002
Location: Denmark
Posts: 1,680
redhead is on a distinguished road
uname is gettign the info from /proc/version so to check it, do a 'cat /proc/version' how ever this sounds like the default boot section in your lilo config is pointing to the old vmlinuz image..
Check that the "default" setting in the /etc/lilo.conf isn't pointing at the label made for the old vmlinuz.
__________________
Don't worry Ma'am, We're university students, We know what We're doing.
-----
If you pull the pin, Mr.Grenade would no longer be your friend.
-----
01000111 01101111 00100000 01000011 00100000 00100001
redhead is offline   Reply With Quote
Old 02-26-2005, 10:48 AM   #11 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,397
sde is on a distinguished road
late last night i figured out that it was using /vmlinuz , not /boot/vmlinuz

after re-compiling again, and running lilo, it got screwed up again. it's difficult to do this over a network, so i just backed up everything and had the data center install a new o/s.
__________________
testing 1 2 3
sde is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Kernel freesoft_2000 Java 6 11-21-2004 08:42 AM
drop an ip class with iptables sde Linux / BSD / OS X 1 08-23-2004 09:52 PM
Database Users Keen on Linux 2.6 Kernel sde Linux / BSD / OS X 0 05-19-2003 02:01 PM


All times are GMT -8. The time now is 07:09 PM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle