Article title: restrict the use of IP addresses for telnet and ftp 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.
Can I restrict access from IP addresses to FTP functions in linux?
I have never been familiar with linux, but I know that in solaris, you can restrict the use of FTP functions by modifying the/etc/ftpd/ftpuser file. In addition, the other two files/etc/hosts. allow and/etc/hosts. deny can restrict the use of IP addresses for FTP. For example, in the/etc/hosts. allow file:
In. telnetd: 100.100.100.122
In. ftpd: 100.100.100.122
In the/etc/hosts. deny file:
ALL: ALL
This means that only the IP address 100.100.100.122 can be used for telnet and ftp functions. All other IP addresses are rejected.
In the solaris system, these two files are not available by default. you can use the vi or touch command to create and edit files and add specific content to meet your needs.
In linux, there are also/etc/hosts. allow and/etc/hosts. deny, but they are slightly different in actual use. For example, in the/etc/hosts. allow file:
In. telnetd: 100.100.100.122
In. vsftpd: 100.100.100.122
In the/etc/hosts. deny file, it is still:
ALL: ALL
The difference is that in. ftpd is in solaris and in. vsftpd is in linux. After the configuration is complete, restart the corresponding service to make the configuration take effect.