Restrict the use of IP addresses for telnet and ftp functions in linux

Source: Internet
Author: User
Tags touch command
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.