So, I’m having a really annoying issue with FTP on my Sophos UTM box, and after working with it for quite a few hours, my hope is that someone inhere knows what I do wrong.
I’m trying to get the Sophos UTM to forward passive and active FTP to my NAS, so far it’s been a partly success since the active FTP works like a charm, the passive FTP however refuses to corporate (I sense a conspiracy between the NAS and FW here ;-) )
But, to get to the point, the connection don’t seem to work with passive FTP, if I check the packetfilter with from SSH with:
tail -f packetfilter.log | grep 87.54.241.xx
On active FTP, this Is what I get, from what I can read (the two last entries), the connection tracker seems to realise that it is FTP data and allow it to pass through.
2014:03:13-00:42:21 vpn ulogd[4510]: id="2000" severity="info" sys="SecureNet" sub="packetfilter" name="Packet logged" action=”log" fwrule="62003" initf="eth1" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:b8" srcip="87.54.241.xx" dstip="46.32.53.xx" proto="6" length="52" tos="0x00" prec="0x00" ttl="122" srcport="56293" dstport="21" tcpflags="SYN"
2014:03:13-00:42:21 vpn ulogd[4510]: id="2002" severity="info" sys="SecureNet" sub="packetfilter" name="Packet accepted" action="accept" fwrule="2" initf="eth1" outitf="eth0" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="87.54.241.xx" dstip="192.168.2.xx" proto="6" length="52" tos="0x00" prec="0x00" ttl="121" srcport="56293" dstport="21" tcpflags="SYN"
2014:03:13-00:42:51 vpn ulogd[4510]: id="2013" severity="info" sys="SecureNet" sub="packetfilter" name="FTP data" action="FTP data" fwrule="60010" initf="eth1" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="87.54.241.xx" dstip="46.32.53.xx" proto="6" length="52" tos="0x00" prec="0x00" ttl="122" srcport="56324" dstport="55540" tcpflags="SYN"
2014:03:13-00:42:54 vpn ulogd[4510]: id="2013" severity="info" sys="SecureNet" sub="packetfilter" name="FTP data" action="FTP data" fwrule="60010" initf="eth1" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="87.54.241.xx" dstip="46.32.53.xx" proto="6" length="52" tos="0x00" prec="0x00" ttl="122" srcport="56327" dstport="55541" tcpflags="SYN"
So, when I do passive FTP to the external address, the connection just times out at the client, when I check the packetfilter with a grep again, this is the result.
2014:03:13-00:59:49 vpn ulogd[4510]: id="2000" severity="info" sys="SecureNet" sub="packetfilter" name="Packet logged " action="log" fwrule="62003" initf="eth1" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="87.54.241.xx" dstip="46.32.53.xx" proto="6" length="52" tos="0x00" prec="0x00" ttl="122" srcport="57348" dstport="21" tcpflags="SYN"
2014:03:13-00:59:49 vpn ulogd[4510]: id="2002" severity="info" sys="SecureNet" sub="packetfilter" name="Packet accepted" action="accept " fwrule="1" initf="eth1" outitf="eth0" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="87.54.241.xx" dstip="192.168.2.xx" proto="6" length="52" tos="0x00" prec="0x00" ttl="121" srcport="57348" dstport="21" tcpflags="SYN"
2014:03:13-01:00:07 vpn ulogd[4510]: id="2002" severity="info" sys="SecureNet" sub="packetfilter" name="Packet accepted" action="accept " fwrule="2" initf="eth0" outitf="eth1" srcmac="0:11:32:22:b2:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="192.168.2.xx" dstip="87.54.241.xx" proto="6" length="62" tos="0x10" prec="0x00" ttl="63" srcport="21" dstport="57296" tcpflags="ACK PSH"
2014:03:13-01:00:18 vpn ulogd[4510]: id="2001" severity="info" sys="SecureNet" sub="packetfilter" name="Packet dropped" action="drop " fwrule="60001" initf="eth1" srcmac="0:16:9c:6c:3e:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="87.54.241.xx" dstip="46.32.53.xx" proto="6" length="40" tos="0x00" prec="0x00" ttl="122" srcport="57348" dstport="21" tcpflags="ACK RST"
2014:03:13-01:00:25 vpn ulogd[4510]: id="2002" severity="info" sys="SecureNet" sub="packetfilter" name="Packet accepted" action="accept " fwrule="2" initf="eth0" outitf="eth1" srcmac="0:11:32:22:b2:xx" dstmac="70:54[:D]2:45:6c:xx" srcip="192.168.2.xx" dstip="87.54.241.xx" proto="6" length="62" tos="0x10" prec="0x00" ttl="63" srcport="21" dstport="57348" tcpflags="ACK PSH"
So, where did that drop come from? My guess is that this drop is what causes the connection tracker to get confused and throw away the entire connection.
But I’m not done yet, because the next thing is really weird, is that I only experience this issue with Windows Explorer, when connection from a client it has a chance of success..
This is from two different attempts right after eachother to browse the FTP server:
This one was a success
[01:04:56] PASV
[01:04:56] 227 Entering Passive Mode (46,32,53,xx,216,247)
[01:04:56] Opening data connection to 46.32.53.xx Port: 55543
This one wasen’t
[01:06:57] PASV
[01:06:57] 227 Entering Passive Mode (46,32,53,xx,216,247)
[01:06:57] Opening data connection to 46.32.53.xx Port: 55543
[01:06:57] LIST -aL
[01:07:18] A connection attempt failed because the connected party did not properly respond after a period of time or established connection failed because connected host has failed to respond
So status right now.
It never works from windows explorer (which to my knowledge uses passive FTP), however it does work from smartFTP when forcing it to use passive ftp (atleast from time to time). There is a time difference of 2 min. between the two attemps above.
I have created rules as following:
NAT: Internet --> FTP --> External interface (change destination to NAS01)
FW: Internet --> FTP --> NAS01 (allow)
Connection tracking is enablet on FTP under Firewall --> Advanced
At the FTP server I have tried configuring it to use the external Address and the internal, both with no luck.
Does anyone have a suggestion to what could be wrong? I'm starting to get frustrated here :-(
All suggestions are highly appreciated.
The setup is running:
FW: Sophos UTM 9.109-1
FTP Server: Synology DSM 5.0-4458
Clients: 64 bit windows 7 and 8.1
This thread was automatically locked due to age.