Once again, we despise those who publish technical articles out of thin air and those who are not good or bad. It's a waste of time! After I added the auto-loading module, I found many misleading technical articles in various search engines, wasting my time and getting angry. The following is my test succeeded. Configure the SNATDNAT of iptables to enable the ftp service in the intranet.
Once again, we despise those who publish technical articles out of thin air and those who are not good or bad. It's a waste of time!
After I added the auto-loading module, I found many misleading technical articles in various search engines, wasting my time and getting angry.
Below is my test successful.
Configure snat dnat of iptables to enableFtpService.
The ip_nat_ftp module needs to be loaded. UseCommandModprobeIp_nat_ftp is executed after executionLsMod |GrepFtp successful.
Restart iptables,Lsmod| Grep ftp not found.
This module must be automatically loaded upon startup.
This method is the most widely spread on the network. It makes sense, but I did not test it. It may be successful to load other modules. The test friend can say:
Echo "modeprobe">/etc/sysconfig/moDuLes/xxx. modules // xxx any name
Chmod755/etc/sysconfig/modules/xxx. modules
However, the method above ip_nat_ftp is certainly not successful.
You can see the following in/etc/sysconfig/iptables-config:
IPTABLES_MODULES = "ip_conn
TrAck_netbios_ns "# Unload modules on restart and stop # Value: yes | no, default: yes # This option has to be 'yes' to get to a sane
StatE for a fire
Wall# Restart or stop. Only
SetTo 'no' if there are problems unloading netfilter # modules. IPTABLES_MODULES_UNLOAD = "yes" // This abnormal process clears the loaded modules when you apply the rules again.
You should have understood that
IPTABLES_MODULES = "ip_conntrack_netbios_ns" changed to IPTABLES_MODULES = "ip_conntrack_netbios_ns ip_nat_ftp ".
Reboot
Lsmod | grep ftp successful.
Environment CentOS5.6.