CentOS 기본 커널인 2.6.18-92 를 쓰다 필요에 의해 2.6.26.5로 커널을 업시켰습니다.
커널을 컴파일할 때 2.6.18-92에 쓰던 .config를 로드하여 설정을 그대로 갖다 썼는데
iptables restore메시지가 뜹니다. 20번째 라인에 에러가 있답니다.
[root@localhost ~]# service iptables start
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: iptables-restore: line 20 failed
[FAILED]
[root@localhost ~]#
----------iptables내용 삭제 및 재설정 후 결과------------------------------------
[root@localhost sysconfig]# cp iptables iptables~
[root@localhost sysconfig]# rm iptables
rm: remove regular file `iptables'? y
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 21 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 22 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 25 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 53 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 80 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 110 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 143 -j ACCEPT
[root@localhost sysconfig]# iptables -A INPUT -p tcp --dport 3306 -j ACCEPT
[root@localhost sysconfig]# /etc/rc.d/init.d/iptables save
Saving firewall rules to /etc/sysconfig/iptables: [ OK ]
[root@localhost sysconfig]# service iptables start
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: [ OK ]
Loading additional iptables modules: ip_conntrack_netbios_n[FAILED]
----------------------------------iptables 필요 모듈 확인----------------------
[root@localhost sysconfig]# lsmod |grep ip
iptable_filter 2688 1
ip_tables 9232 1 iptable_filter
ip6t_REJECT 3456 1
ip6table_filter 2560 1
ip6_tables 10384 1 ip6table_filter
x_tables 13060 4 ip_tables,ip6t_REJECT,xt_tcpudp,ip6_tables
ipv6 203316 17 ip6t_REJECT
dm_multipath 14472 0
dm_mod 45128 3 dm_mirror,dm_log,dm_multipath
----------------------------------------------------------------------------------------------
lsmod로 확인을 해보니 ip_conntrack_netbios_ns모듈
ip_nat, ip_MASQUERADE 모듈 등이 안 올라와 있는 것 같군요.
[root@localhost ~]# modprobe ip_nat
FATAL: Module ip_nat not found.
[root@localhost ~]# modprobe ip_conntrack_netbios_ns
FATAL: Module ip_conntrack_netbios_ns not found.
이 경우 커널을 컴파일 하지 않고 모듈만 몇 개 올릴 수 있다 들었습니다.
make menuconfig에서 필요한 모듈 M체크하고 make modules시 에러가 나네요.
.
.
.
CC [M] net/tipc/eth_media.o
LD [M] net/tipc/tipc.o
CC [M] net/wireless/core.o
CC [M] net/wireless/sysfs.o
CC [M] net/wireless/radiotap.o
CC [M] net/wireless/util.o
CC [M] net/wireless/reg.o
CC [M] net/wireless/nl80211.o
LD [M] net/wireless/cfg80211.o
Building modules, stage 2.
MODPOST 1066 modules
ERROR: "nf_conntrack_destroy" [net/sctp/sctp.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/netfilter/nf_conntrack_netlink.ko] undefined!
ERROR: "ip_ct_attach" [net/netfilter/nf_conntrack.ko] undefined!
ERROR: "nf_ct_destroy" [net/netfilter/nf_conntrack.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/netfilter/nf_conntrack.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/ipv6/sit.ko] undefined!
ERROR: "nf_ct_attach" [net/ipv6/netfilter/ip6t_REJECT.ko] undefined!
ERROR: "nf_ct_attach" [net/ipv6/ipv6.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/ipv6/ipv6.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/ipv6/ip6_tunnel.ko] undefined!
ERROR: "nf_ct_attach" [net/ipv4/netfilter/ipt_REJECT.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/ipv4/ipip.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/ipv4/ip_gre.ko] undefined!
ERROR: "nf_conntrack_destroy" [net/dccp/dccp_ipv4.ko] undefined!
WARNING: modpost: Found 4 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
위의 에러가 나는 원인은 무엇인지요...
다시 컴파일을 하려고 하는데, 매번 에러만 떠서
iptables의 기능을 문제 없이 쓰려면 어떤 모듈을 포함시켜야 하는지 고수님들의
조언을 듣고 싶습니다.
눈팅만으로는 답변글을 볼 수 없습니다. 로그인하셔야 합니다.