LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   how to set iptables in redhat linux 7.1 (https://www.linuxquestions.org/questions/linux-general-1/how-to-set-iptables-in-redhat-linux-7-1-a-5796/)

cmardhekar 08-24-2001 01:42 AM

how to set iptables in redhat linux 7.1
 
if i try to run iptables any command from root prompt for eg.

iptables -L
it give error
/lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: create_module: Opera
tion not permitted
/lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: insmod /lib/modules/
2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o failed
/lib/modules/2.4.2-2/kernel/net/ipv4/netfilter/ip_tables.o: insmod ip_tables fai
led
iptables v1.2.1a: can't initialize iptables table `filter': Permission denied (y
ou must be root)
Perhaps iptables or your kernel needs to be upgraded.


can any one guide me how to do the rules


chandrakant

drjimstuckinwin 08-24-2001 03:22 AM

Hi
Looks like you've still got IP chains. Thus no IP tables to use.
You're heading for a recompile, or just use chains. There's dozens of threads on the boards about howto set it up.
Jim

mikeyt_3333 08-24-2001 10:22 PM

no need for a recompile. Simply type the following:

service ipchains stop

chkconfig --levels 2345 ipchains off

Reboot to allow chkconfig settings you set to take effect, then type:

service iptables start (if it's installed of course) and you shouldn't get that error.

What you've done is prevented the ipchains from loading at all at the run levels 2,3,4 and 5

mikeyt_3333 08-24-2001 11:25 PM

k, my previous post is missing one thing:

rmmod ipchains

this removes the ipchains module from loading into the kernel, now iptables should work okay.


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