歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Unix知識 >> 關於Unix >> iptables下開放ftp連接

iptables下開放ftp連接

日期:2017/3/6 15:22:59   编辑:關於Unix
MI LY: 宋體; mso-bidi-font-size: 9.0pt; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">這兩天在給客戶安裝 服務器 時也順便給他們使用 iptables ,不用不知道,一用才發現 iptables 還有很多東西可以學的,比如

MILY: 宋體; mso-bidi-font-size: 9.0pt; mso-ascii-font-family: "Times New Roman"; mso-hansi-font-family: "Times New Roman"">這兩天在給客戶安裝服務器時也順便給他們使用iptables,不用不知道,一用才發現iptables還有很多東西可以學的,比如開放ftp
iptables
filter表的INPUT鏈的默認策略設為了DROP,其余的鏈均為ACCEPT 該服務器即要作ftp服務器,也要連上別的ftp服務器。即是說要把源端口和目的端口都開放21才行:

clearcase/" target="_blank" >cccccc; WIDTH: 92%; mso-cellspacing: .7pt; mso-padding-alt: 0cm 0cm 0cm 0cm" cellspacing="1" cellpadding="0" width="92%" bgcolor="#cccccc" border="0">


iptables -A INPUT -p tcp --sport 21 -j ACCEPT
iptables -A INPUT -p tcp --dport 21 -j ACCEPT

Copyright © Linux教程網 All Rights Reserved