Hello -- kind of of topic -- but still related
Hello,
I am wondering if any one can help me out with this. On our production FTP server and have setup of the firewall rules to allow FTP traffic.
$IPT -A INPUT -i $EXT -p tcp -d $EXT_IP --destination-port ftp -j ACCEPT $IPT -A INPUT -i $EXT -d $EXT_IP -m state --state RELATED -j ACCEPT $IPT -A INPUT -i $EXT -d $EXT_IP -m state --state ESTABLISHED -j ACCEPT
Above these rules I have the following:
$IPT -A INPUT -i $EXT -f -j firewall
$IPT -A INPUT -i $EXT -d $EXT_IP -m unclean -j firewall
$IPT -A INPUT -i $EXT -d $EXT_IP -p tcp ! --syn -m state --state NEW -j firewall
The firewall target logs the info and then drops the packet.
In my log I am seeing the following -- but our production FTP server is currently out side of our network so we can connecting to it through a Cisco router. Not my doing :(
Dec 3 15:00:57 lightning kernel: Firewall:IN=eth0 OUT= MAC=X.X.X.X SRC=CISCO_ROUTER DST=FTP_SERVER LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=16538 PROTO=TCP SPT=5 DPT=35607 WINDOW=0 RES=0x00 ACK RST URGP=0
There are a large number of these packets -- at first it thought maybe it was the Cisco router doing something funny when a FTP connect closed and it was trying to close or reset the data channel.
Any ideas ?
Signature · 3 lines
Michael Gale Network Administrator Utilitran Corporation
Quoted 7 lines · Michael Gale
In my log I am seeing the following -- but our production FTP server is currently out side of our network so we can connecting to it through a Cisco router. Not my doing :( Dec 3 15:00:57 lightning kernel:
Firewall:IN=eth0 OUT= MAC=X.X.X.X SRC=CISCO_ROUTER DST=FTP_SERVER LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=16538 PROTO=TCP SPT=5 DPT=35607 WINDOW=0 RES=0x00 ACK RST URGP=0
Quoted 5 lines
There are a large number of these packets -- at first it thought maybe it was the Cisco router doing something funny when a FTP connect closed and it was trying to close or reset the data channel.
Any ideas ?
The packet in the log above has ACK and RST set - that suggests that the remote end has rather abruptly decided to terminate the connection (ACK and FIN would be used for a polite termination).
However - Source Port 5??? Remote Job Entry??? That seems so unlikely...
Frankly I can't see that it has anything to do with FTP service at all.
It would be useful to know what network activity preceded this log entry - what was someone trying to do (almost certainly starting from the FTP server, sending to the router)?
Antony.
Signature · 8 lines
You can spend the whole of your life trying to be popular,
but at the end of the day the size of the crowd at your funeral
will be largely dictated by the weather.
- Frank Skinner
Please reply to the list;
please don't CC me.Hello,
Thanks for the response -- it starting logging all outbound traffic and found that the FTP server is sending out ident request to the Cisco router. Which is odd because there is NO ident server on the FTP box and the FTP config specifies no Ident lookups.
The packet leaves from port X to the Cisco on port 113 but then the Cisco returns a ACK RST from port number < 10 to port X.
Michael.
Quoted 40 lines · On Wed, 3 Dec 2003 22:34:22 +0000 Antony Stone <[email protected]>…
Quoted 7 lines · Michael Gale
In my log I am seeing the following -- but our production FTP server is currently out side of our network so we can connecting to it through a Cisco router. Not my doing :( Dec 3 15:00:57 lightning kernel:
Firewall:IN=eth0 OUT= MAC=X.X.X.X SRC=CISCO_ROUTER DST=FTP_SERVER LEN=40 TOS=0x00 PREC=0x00 TTL=255 ID=16538 PROTO=TCP SPT=5 DPT=35607 WINDOW=0 RES=0x00 ACK RST URGP=0Quoted 5 lines
There are a large number of these packets -- at first it thought maybe it was the Cisco router doing something funny when a FTP connect closed and it was trying to close or reset the data channel.
Any ideas ?
The packet in the log above has ACK and RST set - that suggests that the remote end has rather abruptly decided to terminate the connection (ACK and FIN would be used for a polite termination).
However - Source Port 5??? Remote Job Entry??? That seems so unlikely...
Frankly I can't see that it has anything to do with FTP service at all.
It would be useful to know what network activity preceded this log entry - what was someone trying to do (almost certainly starting from the FTP server, sending to the router)?
Antony.
Signature · 8 lines
You can spend the whole of your life trying to be popular, but at the end of the day the size of the crowd at your funeral will be largely dictated by the weather. - Frank Skinner Please reply to the list; please don't CC me.
Signature · 3 lines
Michael Gale Network Administrator Utilitran Corporation
Quoted 6 lines · Michael Gale
Hello,
Thanks for the response -- it starting logging all outbound traffic and
found that the FTP server is sending out ident request to the Cisco router. Which is odd because there is NO ident server on the FTP box and the FTP config specifies no Ident lookups.
Ident requests are generally caused by the use of tcpwrappers (see your
inetd.conf file to confirm this). You do not need to be running an ident
server for your machine to send out ident requests (those mean that it is acting as a client, asking for responses from some other server).
Quoted 2 lines
The packet leaves from port X to the Cisco on port 113 but then the Cisco returns a ACK RST from port number < 10 to port X.
That is not the way TCP is supposed to work. All responses should be from the source port which the original request packet went to as destination port.
If you send a packet to port 113, you should get a reply (whether it's a goood one saying "hello" or a bad one saying "no service here") from port 113.
Antony.
Signature · 4 lines
Most people have more than the average number of legs.
Please reply to the list;
please don't CC me.Ok -- as I look into the Cisco router issue .. is there any way to make it so when a ftp connection comes in and Inetd using tcpwrappers to pass the connection to my FTP server that NO Ident lookups are done :)
Michael.
Quoted 32 lines · On Wed, 3 Dec 2003 23:36:14 +0000 Antony Stone <[email protected]>…
Quoted 6 lines · Michael Gale
Hello,
Thanks for the response -- it starting logging all outbound traffic and
found that the FTP server is sending out ident request to the Cisco router. Which is odd because there is NO ident server on the FTP box and the FTP config specifies no Ident lookups.Ident requests are generally caused by the use of tcpwrappers (see your
inetd.conf file to confirm this). You do not need to be running an ident
server for your machine to send out ident requests (those mean that it is acting as a client, asking for responses from some other server).Quoted 2 lines
The packet leaves from port X to the Cisco on port 113 but then the Cisco returns a ACK RST from port number < 10 to port X.
That is not the way TCP is supposed to work. All responses should be from the source port which the original request packet went to as destination port.
If you send a packet to port 113, you should get a reply (whether it's a goood one saying "hello" or a bad one saying "no service here") from port 113.
Antony.
Signature · 4 lines
Most people have more than the average number of legs. Please reply to the list; please don't CC me.
Signature · 3 lines
Michael Gale Network Administrator Utilitran Corporation
Quoted 3 lines · Michael Gale
Ok -- as I look into the Cisco router issue .. is there any way to make it so when a ftp connection comes in and Inetd using tcpwrappers to pass the connection to my FTP server that NO Ident lookups are done :)
Sure - simply remove the "tcpd" bit of the entry in /etc/inetd.conf and just point to the ftpd daemon itself.
If you're not sure what to do, post the line from /etc/inetd.conf which begins with "ftp" and we'll try to help.
Antony.
Signature · 6 lines
Anyone that's normal doesn't really achieve much.
- Mark Blair, Australian rocket engineer
Please reply to the list;
please don't CC me.Hello,
I can turn off the tcpwrapper but I was hoping there would be away around it.
ftp stream tcp nowait root /usr/sbin/tcpd proftpd
It is a largely used FTP server and I have been contemplating running it as a stand alone daemon.
Michael.
Quoted 23 lines · On Thu, 4 Dec 2003 00:27:46 +0000 Antony Stone <[email protected]>…
Quoted 3 lines · Michael Gale
Ok -- as I look into the Cisco router issue .. is there any way to make it so when a ftp connection comes in and Inetd using tcpwrappers to pass the connection to my FTP server that NO Ident lookups are done :)
Sure - simply remove the "tcpd" bit of the entry in
/etc/inetd.confand just point to the ftpd daemon itself.If you're not sure what to do, post the line from
/etc/inetd.confwhich begins with "ftp" and we'll try to help.Antony.
Signature · 6 lines
Anyone that's normal doesn't really achieve much. - Mark Blair, Australian rocket engineer Please reply to the list; please don't CC me.
Signature · 3 lines
Michael Gale Network Administrator Utilitran Corporation
Quoted 9 lines · Michael Gale
Hello,
I can turn off the tcpwrapper but I was hoping there would be away around
it.ftp stream tcp nowait root
/usr/sbin/tcpdproftpdIt is a largely used FTP server and I have been contemplating running it as a stand alone daemon.
For a busy server this could be an excellent solution - and you should find
how to do it in "man proftpd" and/or "man /etc/proftpd.conf". It can
definitely be run as a standalone daemon without using inetd.
Antony.
Signature · 4 lines
Ramdisk is not an installation procedure.
Please reply to the list;
please don't CC me.