1、安裝作業系統時候
關閉了不必要的服務 (anacron apmd atd autofs cups gpm kudzu named netfs nfs nfslock portmap ntpd postfix sendmail smb xfs chargen chargen-udp daytime daytime-udp krb5-telnet gssftp xinetd)
2、安裝了iptables,我是用gShield來配置的防火牆
iptablse –L 顯示的資訊如下:
[root@server admin]# /sbin/iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
loopback all -- anywhere anywhere
BLACKLIST all -- 66.45.237.220 anywhere
RESERVED all -- 10.0.0.0/8 anywhere
RESERVED all -- 172.16.0.0/12 anywhere
RESERVED all -- 192.168.0.0/16 anywhere
RESERVED all -- ALL-SYSTEMS.MCAST.NET anywhere
RESERVED all -- ALL-ROUTERS.MCAST.NET anywhere
RESERVED all -- DVMRP.MCAST.NET anywhere
RESERVED all -- OSPF-ALL.MCAST.NET anywhere
RESERVED all -- OSPF-DSIG.MCAST.NET anywhere
RESERVED all -- RIP2-ROUTERS.MCAST.NET anywhere
RESERVED all -- PIM-ROUTERS.MCAST.NET anywhere
RESERVED all -- ALL-CBT-ROUTERS.MCAST.NET anywhere
MULTICAST all -- ALL-SYSTEMS.MCAST.NET anywhere
MULTICAST all -- ALL-ROUTERS.MCAST.NET anywhere
MULTICAST all -- DVMRP.MCAST.NET anywhere
MULTICAST all -- OSPF-ALL.MCAST.NET anywhere
MULTICAST all -- OSPF-DSIG.MCAST.NET anywhere
MULTICAST all -- RIP2-ROUTERS.MCAST.NET anywhere
MULTICAST all -- PIM-ROUTERS.MCAST.NET anywhere
MULTICAST all -- ALL-CBT-ROUTERS.MCAST.NET anywhere
ACCEPT icmp -- anywhere anywhere icmp destination-unreachable
ACCEPT icmp -- anywhere anywhere icmp time-exceeded
ACCEPT icmp -- anywhere anywhere icmp echo-reply
DROPICMP icmp -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp spts:32769:65535 dpts:traceroute:33523
ADMIN all -- 221.10.254.40 anywhere
DNS udp -- ns.sc.cninfo.net anywhere udp spt:domain
DNS udp -- 221.10.254.231 anywhere udp spt:domain
PUBLIC tcp -- anywhere www.****.com tcp dpt:ftp
PUBLIC tcp -- anywhere www.****.com tcp dpt:ftp-data
PUBLIC tcp -- anywhere www.****.com tcp dpt:http
PUBLIC udp -- anywhere www.****.com udp dpt:http
PUBLIC tcp -- anywhere www.****.com tcp dpt:https
PUBLIC udp -- anywhere www.****.com udp dpt:https
PUBLIC udp -- anywhere www.****.com udp dpt:domain
PUBLIC tcp -- anywhere www.****.com tcp dpt:ssh
PUBLIC udp -- anywhere www.****.com udp dpt:ssh
PUBLIC tcp -- anywhere www.****.com tcp dpt:auth
PUBLIC udp -- anywhere www.****.com udp dpt:auth
PUBLIC tcp -- anywhere www.****.com tcp dpt:mysql
PUBLIC udp -- anywhere www.****.com udp dpt:mysql
CLOSED tcp -- anywhere www.****.com tcp dpt:32775
CLOSED udp -- anywhere www.****.com udp dpt:32775
HIGHPORT tcp -- anywhere anywhere tcp dpts:1024:65535
HIGHPORT udp -- anywhere anywhere udp dpts:1024:65535
OPENPORT tcp -- anywhere anywhere tcp dpt:http
OPENPORT udp -- anywhere anywhere udp dpt:http
OPENPORT tcp -- anywhere anywhere tcp dpt:81
OPENPORT udp -- anywhere anywhere udp dpt:81
OPENPORT tcp -- anywhere anywhere tcp dpt:ftp
OPENPORT udp -- anywhere anywhere udp dpt:ftp
OPENPORT tcp -- anywhere anywhere tcp dpt:ssh
OPENPORT udp -- anywhere anywhere udp dpt:ssh
OPENPORT tcp -- anywhere anywhere tcp dpt:mysql
OPENPORT udp -- anywhere anywhere udp dpt:mysql
OPENPORT tcp -- anywhere anywhere tcp dpt:webcache
OPENPORT udp -- anywhere anywhere udp dpt:webcache
OPENPORT tcp -- anywhere anywhere tcp dpt:rsync
OPENPORT udp -- anywhere anywhere udp dpt:rsync
SCAN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,PSH,ACK,URG state INVALID,NEW,RELATED,UNTRACKED
SCAN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/NONE state INVALID,NEW,RELATED,UNTRACKED
SCAN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN state INVALID,NEW,RELATED,UNTRACKED
STATEFUL all -- anywhere anywhere
Chain FORWARD (policy DROP)
target prot opt source destination
BLACKLIST all -- 66.45.237.220 anywhere
SCAN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/FIN,SYN,RST,PSH,ACK,URG
SCAN tcp -- anywhere anywhere tcp flags:FIN,SYN,RST,PSH,ACK,URG/NONE
BLOCK_OUT tcp -- anywhere anywhere tcp dpt:netbios-ns
BLOCK_OUT udp -- anywhere anywhere udp dpt:netbios-ns
BLOCK_OUT tcp -- anywhere anywhere tcp dpt:netbios-dgm
BLOCK_OUT udp -- anywhere anywhere udp dpt:netbios-dgm
BLOCK_OUT tcp -- anywhere anywhere tcp dpt:netbios-ssn
BLOCK_OUT udp -- anywhere anywhere udp dpt:netbios-ssn
STATEFUL all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
loopback all -- anywhere anywhere
DROP icmp -- anywhere anywhere state INVALID
BLOCK_OUT tcp -- anywhere anywhere tcp dpt:netbios-ns
BLOCK_OUT udp -- anywhere anywhere udp dpt:netbios-ns
BLOCK_OUT tcp -- anywhere anywhere tcp dpt:netbios-dgm
BLOCK_OUT udp -- anywhere anywhere udp dpt:netbios-dgm
BLOCK_OUT tcp -- anywhere anywhere tcp dpt:netbios-ssn
BLOCK_OUT udp -- anywhere anywhere udp dpt:netbios-ssn
Chain ACCEPTnLOG (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning prefix `gShield (accept) '
ACCEPT all -- anywhere anywhere
Chain ADMIN (1 references)
target prot opt source destination
DROP all -- anywhere anywhere MAC ! 00

0:B7:27:62:0A
ACCEPT all -- anywhere anywhere
Chain BLACKLIST (2 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning prefix `gShield (blacklisted drop) '
DROP all -- anywhere anywhere
Chain BLOCK_OUT (12 references)
target prot opt source destination
DROP all -- anywhere anywhere
Chain CLIENT (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain CLOSED (2 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning prefix `gShield (closed port drop) '
DROP tcp -- anywhere anywhere
DROP udp -- anywhere anywhere
DROP all -- anywhere anywhere
Chain DHCP (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning prefix `gShield (DHCP accept) '
ACCEPT all -- anywhere anywhere
Chain DMZ (0 references)
target prot opt source destination
LOG all -- anywhere anywhere LOG level warning prefix `gShield (DMZ drop) '
DROP all -- anywhere anywhere
Chain DNS (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain DROPICMP (1 references)
target prot opt source destination
DROP all -- anywhere anywhere
Chain DROPnLOG (1 references)
target prot opt source destination
DROP udp -- anywhere anywhere udp dpts:netbios-ns:netbios-ssn
ACCEPT tcp -- anywhere anywhere tcp spt:http dpts:1024:65535 flags:!SYN,RST,ACK/SYN
DROP udp -- anywhere 255.255.255.255 udp spt:bootps dpt:bootpc
QUEUE all -- anywhere anywhere limit: avg 20/min burst 5
DROP tcp -- anywhere anywhere
DROP udp -- anywhere anywhere
Chain HIGHPORT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain MON_OUT (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain MULTICAST (8 references)
target prot opt source destination
DROP all -- anywhere anywhere
Chain OPENPORT (14 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain PUBLIC (13 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere