Article Title: RHCE experiment: xinetd-Based Access Control in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Requirements: configure the telnet server and use xinetd to implement the following access control functions
1. the maximum number of connections to the telnet server is 20.
2. If the number of telnet requests per second reaches 4, the service will automatically stop for 1 minute.
3. Only hosts from the trust.com domain and 192.168.0.0/24 can access your telnet server.
4. Deny access to your telnet server from hosts 192.168.0.100 and bad.trust.com
5. Allow the above clients to access the telnet server from PM to PM
6. Each client can have up to two telnet connections to the server at the same time.
Lab environment:
1. Windows XP host, IP = 192.168.0.2
2. Redhat Linux5 Vm, IP = 192.168.0.1
[Root @ localhost ~] # Cat/etc/hosts
127.0.0.1 localhost. localdomain localhost
192.168.0.1 ns.trust.com ns
192.168.0.2 bad.trust.com bad
Solution:
[Root @ localhost ~] # Vi/etc/xinetd. d/telnet
Instances = 20
Cps = 4 60
Only_from = 192.168.0.0/24 .trust.com
No_access = 192.168.0.1 bad.trust.com
Access_times = --
Per_source = 2
[Root @ localhost ~] # Service xinetd restart