mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-25 20:22:12 +02:00
Update the FTP article for 5.0
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
a959c4a3bb
commit
94f2f5aaab
27
docs/FTP.xml
27
docs/FTP.xml
@ -353,8 +353,7 @@ FTP(HELPER) loc - </programlisting>
|
|||||||
|
|
||||||
<para>or equivalently</para>
|
<para>or equivalently</para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DEST PROTO DEST
|
<programlisting>#ACTION SOURCE DEST PROTO DPORT
|
||||||
# PORT(S)
|
|
||||||
HELPER loc - tcp 21 { helper=ftp }</programlisting>
|
HELPER loc - tcp 21 { helper=ftp }</programlisting>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
@ -391,8 +390,7 @@ HELPER loc - tcp 21 { helper=ftp }</programlisting>
|
|||||||
|
|
||||||
<para>Example:</para>
|
<para>Example:</para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/ SWITCH
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT USER SWITCH
|
||||||
# PORT(S) PORT(S) GROUP
|
|
||||||
?if $AUTOHELPERS && __CT_TARGET
|
?if $AUTOHELPERS && __CT_TARGET
|
||||||
?if __FTP_HELPER
|
?if __FTP_HELPER
|
||||||
CT:helper:ftp all - tcp 21
|
CT:helper:ftp all - tcp 21
|
||||||
@ -405,8 +403,7 @@ CT:helper:ftp all - tcp 21
|
|||||||
access from your 'loc' zone, then add this rule outside of the outer-most
|
access from your 'loc' zone, then add this rule outside of the outer-most
|
||||||
?if....?endif shown above.</para>
|
?if....?endif shown above.</para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/ SWITCH
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT USER SWITCH
|
||||||
# PORT(S) PORT(S) GROUP
|
|
||||||
...
|
...
|
||||||
CT:helper:ftp loc - tcp 21</programlisting>
|
CT:helper:ftp loc - tcp 21</programlisting>
|
||||||
|
|
||||||
@ -433,8 +430,7 @@ CT:helper:ftp loc - tcp 21</programlisti
|
|||||||
|
|
||||||
<para><filename>/etc/shorewall/rules:</filename></para>
|
<para><filename>/etc/shorewall/rules:</filename></para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DEST PROTO DEST
|
<programlisting>#ACTION SOURCE DEST PROTO DPORT
|
||||||
# PORT(S)
|
|
||||||
DNAT net loc:192.168.1.2:21 tcp 12345 { helper=ftp }the</programlisting>
|
DNAT net loc:192.168.1.2:21 tcp 12345 { helper=ftp }the</programlisting>
|
||||||
|
|
||||||
<para>That entry will accept ftp connections on port 12345 from the net
|
<para>That entry will accept ftp connections on port 12345 from the net
|
||||||
@ -442,8 +438,7 @@ DNAT net loc:192.168.1.2:21 tcp 12345 { helper=ft
|
|||||||
|
|
||||||
<para><filename>/etc/shorewall/conntrack:</filename></para>
|
<para><filename>/etc/shorewall/conntrack:</filename></para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE USER/ SWITCH
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT USER SWITCH
|
||||||
# PORT(S) PORT(S) GROUP
|
|
||||||
...
|
...
|
||||||
CT:helper:ftp loc - tcp 12345</programlisting>
|
CT:helper:ftp loc - tcp 12345</programlisting>
|
||||||
|
|
||||||
@ -531,8 +526,7 @@ options nf_nat_ftp</programlisting>
|
|||||||
<para>Otherwise, for FTP you need exactly <emphasis
|
<para>Otherwise, for FTP you need exactly <emphasis
|
||||||
role="bold">one</emphasis> rule:</para>
|
role="bold">one</emphasis> rule:</para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE ORIGINAL
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT ORIGDEST
|
||||||
# PORT(S) PORT(S) DESTINATION
|
|
||||||
ACCEPT or <<emphasis>source</emphasis>> <<emphasis>destination</emphasis>> tcp 21 - <external IP addr> if
|
ACCEPT or <<emphasis>source</emphasis>> <<emphasis>destination</emphasis>> tcp 21 - <external IP addr> if
|
||||||
DNAT ACTION = DNAT</programlisting>
|
DNAT ACTION = DNAT</programlisting>
|
||||||
|
|
||||||
@ -558,14 +552,12 @@ DNAT ACTION =
|
|||||||
<para>Suppose that you run an FTP server on 192.168.1.5 in your local
|
<para>Suppose that you run an FTP server on 192.168.1.5 in your local
|
||||||
zone using the standard port (21). You need this rule:</para>
|
zone using the standard port (21). You need this rule:</para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE ORIGINAL
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT ORIGDEST
|
||||||
# PORT(S) PORT(S) DESTINATION
|
|
||||||
FTP(DNAT) net loc:192.168.1.5</programlisting>
|
FTP(DNAT) net loc:192.168.1.5</programlisting>
|
||||||
</example><example id="Example4">
|
</example><example id="Example4">
|
||||||
<title>Allow your DMZ FTP access to the Internet</title>
|
<title>Allow your DMZ FTP access to the Internet</title>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE ORIGINAL
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT ORIGDEST
|
||||||
# PORT(S) PORT(S) DESTINATION
|
|
||||||
FTP(ACCEPT) dmz net</programlisting>
|
FTP(ACCEPT) dmz net</programlisting>
|
||||||
</example></para>
|
</example></para>
|
||||||
|
|
||||||
@ -588,8 +580,7 @@ WINDOW=46 RES=0x00 ACK PSH URGP=0 OPT (0101080A932DFE0231935CF7) MARK=0x1</progr
|
|||||||
<para>I see this problem occasionally with the FTP server in my DMZ. My
|
<para>I see this problem occasionally with the FTP server in my DMZ. My
|
||||||
solution is to add the following rule:</para>
|
solution is to add the following rule:</para>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DESTINATION PROTO DEST SOURCE ORIGINAL
|
<programlisting>#ACTION SOURCE DESTINATION PROTO DPORT SPORT ORIGDEST
|
||||||
# PORT(S) PORT(S) DESTINATION
|
|
||||||
ACCEPT:info dmz net tcp - 20</programlisting>
|
ACCEPT:info dmz net tcp - 20</programlisting>
|
||||||
|
|
||||||
<para>The above rule accepts and logs all active mode connections from my
|
<para>The above rule accepts and logs all active mode connections from my
|
||||||
|
Loading…
x
Reference in New Issue
Block a user