11. 显示系统的arp缓存表,并将以下的对应关系存入文件,然后以加载文件体例添加到arp表中,再次显示arp缓存表,然后删除192.168.0.3地址行。 % [5 D W# N7 ^
192.168.0.2 aa:bb:cc:00:00:00 & F. @# @: F- P( L3 B
192.168.0.3 aa:bb:cc:dd:00:00
6 A0 m+ f4 B$ A0 J* Z S) R: `, ~4 }$ z192.168.0.4 aa:bb:cc:ee:00:00 " ?8 `) [/ J5 Y5 `9 d8 A4 ]
谜底:arp -a
' _& i3 P9 w, R" v8 j2 s- f#存入文件 test.arp % q. t9 M' o. _0 B; O7 Q
arp -f test.arp
6 G6 P8 _/ j0 E) ^* p$ R" Farp -d 192.168.0.3 3 q& `2 v n8 W( ~" U! P2 p
12. 设置turbolinux中的proftpd处事器:许可匿名登录,而且匿名登录中如不美观ip地址为192.168.1.11则许可其上传数据,其他只许可下载;设置匿名登录的接待文本;禁止218.193.118.0网段的访谒; 2 W# g$ G" z3 q/ j& Q5 V8 m
谜底:1.编纂/etc/proftpd/proftpd.conf
* Z& C# t, L' r! m( \. k; ~. {: J$ [2 k: s) v9 Y: F4 d. A: O
order deny,allow
* q& `% y0 H2 s) G! n& G. l q, ldeny from 218.193.118.
3 W+ C1 N# Y+ ?+ P! G0 Sallow from all ! h& ?6 O3 b% R0 L
* r9 Y4 J! W1 n) K3 o, jorder deny,allow & V1 O$ D! ?6 `; h R) w8 n" T
allow 192.168.1.11
2 q U G; z" K/ c- U9 ]; o* `" v0 X" b$ \; w- i( p
displaylogin message.msg
% A F* m5 t3 G; [9 g' E
% w6 f1 S- ?5 T/ L2.启动处事 service proftpd start 6 |% f9 d( @, O" Q0 y7 i6 n
13. 设定linux下的防火墙
' W1 I" y. V! k4 x 1.设定一个用户链
! O8 {$ M3 l' w: U9 b! @& Z; H 2.记实所有经由过程23端口的所稀有据包,并用精采的可识此外名目记实 ! a8 b9 i; V% }3 M& T
3.查看日志中记实的信息
0 i0 b( ]7 K/ Q谜底:iptables -n telnet
% G" v/ N6 T6 i' Z' ~6 u1 Biptables -a telnet -j log --log-tcp-options --log-ip-options
6 M1 _5 y7 R+ W# S4 L--log-prefix ":" % C6 w2 V& o5 h6 s; _2 U
iptables -a log_drop -j accept : a$ R1 H: n `( d0 m7 k
iptables -a input -p tcp --dport 23 -j log_drop
, Q8 q6 d) S# m# piptables -a output -p tcp --sport 23 -j log_drop
* Z4 Q. @- J+ v# E; M
r* s5 n/ J* }3 w0 h" B8 w14. 设置turbolinux server中的telnet处事器,设置装备摆设该处事在运行级别3和5启动,指定只能由192.168.1.11才能访谒该telnet处事,并许可根用户使用telnet. + [& I! g n% |# W0 X' q& D; S
谜底:1.chkconfig telnet --level 35 on $ F3 U/ [% L% ]
2.编纂/etc/hosts.allow
. f6 g; Y) F# m3 r" w; S; Hin.telnetd : 192.168.1.11 6 ^7 M' R6 H. s8 T( _
3.编纂/etc/pam.d/login,注释第一行。
6 {" t* X+ L& u6 \4.启动telnet处事 service xinetd restart |