Chapter 43. Securing Your Network
664
The
only_from
and
no_access
options can use a list of IP addresses or host names, or can specify
an entire network. Like TCP Wrappers, combining
xinetd
access control with the enhanced logging
configuration can increase security by blocking requests from banned hosts while verbosely recording
each connection attempt.
For example, the following
/etc/xinetd.d/telnet
file can be used to block Telnet access from a
particular network group and restrict the overall time range that even allowed users can log in:
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/kerberos/sbin/telnetd
log_on_failure += USERID
no_access = 172.16.45.0/24
log_on_success += PID HOST EXIT
access_times = 09:45-16:15
}
In this example, when a client system from the
10.0.1.0/24
network, such as
10.0.1.2
, tries to
access the Telnet service, it receives the following message:
Connection closed by foreign host.
In addition, their login attempts are logged in
/var/log/messages
as follows:
Sep 7 14:58:33 localhost xinetd[5285]: FAIL: telnet address from=172.16.45.107
Sep 7 14:58:33 localhost xinetd[5283]: START: telnet pid=5285 from=172.16.45.107
Sep 7 14:58:33 localhost xinetd[5283]: EXIT: telnet status=0 pid=5285 duration=0(sec)
When using TCP Wrappers in conjunction with
xinetd
access controls, it is important to understand
the relationship between the two access control mechanisms.
The following is the sequence of events followed by
xinetd
when a client requests a connection:
1. The
xinetd
daemon accesses the TCP Wrappers hosts access rules using a
libwrap.a
library
call. If a deny rule matches the client, the connection is dropped. If an allow rule matches the
client, the connection is passed to
xinetd
.
2. The
xinetd
daemon checks its own access control rules both for the
xinetd
service and
the requested service. If a deny rule matches the client, the connection is dropped. Otherwise,
xinetd
starts an instance of the requested service and passes control of the connection to that
service.
Important
Care should be taken when using TCP Wrappers access controls in conjunction with
xinetd
access controls. Misconfiguration can cause undesirable effects.
Содержание ENTERPRISE LINUX 5 - VIRTUAL SERVER ADMINISTRATION
Страница 22: ...xxii ...
Страница 28: ......
Страница 36: ...10 ...
Страница 40: ...14 ...
Страница 96: ...70 ...
Страница 116: ...90 ...
Страница 144: ...118 ...
Страница 146: ......
Страница 158: ...132 ...
Страница 165: ...Installing and Removing Packages 139 Figure 11 7 Installing and removing packages simultaneously ...
Страница 166: ...140 ...
Страница 172: ...146 ...
Страница 178: ......
Страница 228: ...202 ...
Страница 264: ...238 ...
Страница 318: ...292 ...
Страница 330: ...304 ...
Страница 388: ...362 ...
Страница 428: ...402 ...
Страница 452: ......
Страница 458: ...432 ...
Страница 476: ...450 ...
Страница 478: ...452 ...
Страница 494: ...468 ...
Страница 498: ...472 ...
Страница 530: ...504 ...
Страница 536: ...510 ...
Страница 544: ...Chapter 36 Log Files 518 Figure 36 7 Log file contents after five seconds ...
Страница 546: ......
Страница 550: ...524 ...
Страница 576: ......
Страница 584: ...558 ...
Страница 608: ......
Страница 776: ...750 ...
Страница 796: ...770 ...
Страница 800: ...774 ...
Страница 804: ......
Страница 806: ...780 ...
Страница 808: ...782 ...
Страница 816: ...790 ...
Страница 820: ...794 ...
Страница 822: ...796 ...
Страница 830: ...804 ...
Страница 836: ...810 ...
Страница 844: ...818 ...
Страница 848: ...822 ...