Get the App
SLTechnology News&Howtos  ›  Network Security  › 

Ftp external network connection

Shulou Source: shulou.com Published: 2022-06-01 06:00:01 10月04日 Update

Today, let's talk about the construction of ftp in redhat.

First of all, the construction of ftp is very simple, personally, but the company requires that it can be accessed from the external network and can be downloaded, so there is a problem that the internal network can be accessed but the external network cannot, so it is very tangled. After looking for it on the Internet for a long time, it turns out that it is the reason for active mode and passive mode. Here is how ftp can be connected from the external network.

Just install ftp directly with yum

Yum-y install ftp

Profile modification

[root@localhost ~] # grep-Ev "^ # | ^ $" / etc/vsftpd/vsftpd.conf

Anonymous_enable=YES

Local_enable=YES

Write_enable=YES

Local_umask=022

Anon_upload_enable=YES

Dirmessage_enable=YES

Xferlog_enable=YES

Connect_from_port_20=YES

Xferlog_std_format=YES

Listen=YES

Pam_service_name=vsftpd

Userlist_enable=YES

Tcp_wrappers=YES

Pasv_enable=YES

Pasv_min_port=8888

Pasv_max_port=8889

4. Add users and authorize

5. Restart ftp: service vsftpd restart

6. Firewall configuration

Nat server zone untrust protocol tcp global public network ip 8888 inside intranet ip 8888

Nat server zone untrust protocol tcp global public network ip 8889 inside intranet ip 8889

Nat server zone untrust protocol tcp global public network ip ftp inside private network ip ftp

Nat server zone untrust protocol tcp global public network ip 20 intranet ip 20

Ports 21 and 20 need to be opened

7. Connect through flashFXP software (no need to configure passive mode, default)

Tags: Mode configuration active personal company reason file user port software problem firewall fire prevention Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information NVidia Shulou Tech Info MariaDB Microsoft