Although the Linux system is much safer than the Windows system, it is a good program development environment, but there are still some security risks. After the Linux user exits the system, there will still be multiple IP login risks. How do you limit the IP login shell script after Linux exits? The following small series introduces some examples.
production environment, there may be hosts.allow are modified to allow more ip landing machines other administrators or users; In order to facilitate unified management, we can withdraw the user to modify the unified time The allow and deny files are set to the default settings. At the same time, it can automatically obtain the entire ip segment of the machine with ip to allow login.
test -f /root/.bash_logout && chattr -i /root/.bash_logout
cat 》/root/.bash_logout "EOF
export TERM =xterm
/usr/bin/chattr -i /etc/hosts.allow /etc/hosts.deny
#for hosts.deny
/bin/awk &lsquo ;BEGIN{FS=“[=. ]”;RS=“\ ”};/^IPADDR/{print “sshd:all EXCEPT ”\\$2“. ”\\$3“. ”\\$4“.0/255.255.255.0”}’ /etc/sysconfig/network-scripts/ifcfg-*
The time of the Linux system is sometimes inaccurate. Inaccurate time will cause errors in the time
In Linux, echo is a DOS batch processing command that can be used to set the displa
A lot of linux users will give the system a network cable to connect to the interna
Dynamic library can save disk and memory space, make program upgrade easier, increa
Linux how to carry out Alibaba Cloud server FTP configuration
What if the Linux partition read-only causes the database to stop writing data?
How to install VPN in CentOS system
Ubuntu steps to install VLC player
Ubuntu 13.10 tips for installing the latest Linux kernel
Linux view method of memory resource usage
Ubuntu modify the PATH environment variable, the account can not log in how to do?
How does Linux use the OOM killer mechanism?
How to solve the problem after unable to connect to the network after reinstalling Linux
How to remove the plus sign after the Linux Kernel version number?
What should I do if the U disk file is read-only on Ubuntu and cannot be deleted?
What is the meaning of each option in the XP system "Start Menu"
Teach you a key to close all running programs of Win7 system
How to solve the problem that the Modern game installed in Windows8 system cannot be archived
How to view and delete the wireless network configuration Win8/Win8.1
Why is my computer playing games always very card-like?
Win10 9926 start menu can not open how to solve?
Use the cool music box to make ringtones
Windows 7 Upgrade Risk and Upgrade Benefit Analysis