Community discussions

MikroTik App
 
mhitrov
newbie
Topic Author
Posts: 34
Joined: Mon Dec 27, 2004 10:30 am

Do not send RST/ACK on closed port

Mon Nov 15, 2010 2:15 pm

Hi,
How can I configure RouterOS, to not automatically send RST/ACK to a remote host which is trying to connect to an closed port?

P.S.
I don't want to use an additional drop rule in the firewall.

Thanks
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Do not send RST/ACK on closed port

Mon Nov 15, 2010 2:38 pm

Maybe you are looking for action=tarpit?
tarpit - captures and holds TCP connections (replies with SYN/ACK to the inbound TCP SYN packet)
 
mhitrov
newbie
Topic Author
Posts: 34
Joined: Mon Dec 27, 2004 10:30 am

Re: Do not send RST/ACK on closed port

Mon Nov 15, 2010 3:12 pm

Hi,
I'm looking for a global RouterOS configuration something like this on FreeBSD (for TCP and UDP):

net.inet.tcp.blackhole=2
net.inet.tcp.blackhole defines what happens when a TCP packet is received on a closed port. When set to '1', SYN packets arriving on a closed port will be dropped without a RST packet being sent back. When set to '2', all packets arriving on a closed port are dropped without an RST being sent back. This saves both CPU time because packets don't need to be processed as much, and outbound bandwidth as packets are not sent out.

net.inet.udp.blackhole=1
net.inet.udp.blackhole is similar to net.inet.tcp.blackhole in its function. As the UDP protocol does not have states like TCP, there is only a need for one choice when it comes to dropping UDP packets. When net.inet.udp.blackhole is set to '1', all UDP packets arriving on a closed port will be dropped.

Cheers


Maybe you are looking for action=tarpit?
tarpit - captures and holds TCP connections (replies with SYN/ACK to the inbound TCP SYN packet)
 
blake
Member
Member
Posts: 426
Joined: Mon May 31, 2010 10:46 pm
Location: Arizona

Re: Do not send RST/ACK on closed port

Mon Nov 15, 2010 5:03 pm

Hi,

This does not emulate FreeBSD 100%, but you're wanting action=drop instead of action=reject in your firewall filter rules. This will not send a RST in response to a closed port.
 
User avatar
sergejs
MikroTik Support
MikroTik Support
Posts: 6695
Joined: Thu Mar 31, 2005 3:33 pm
Location: Riga, Latvia
Contact:

Re: Do not send RST/ACK on closed port

Mon Nov 15, 2010 5:05 pm

Tarpit does not send RST, it will silently drop the connection, when initiator would think that connection is actually open.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Do not send RST/ACK on closed port

Wed Nov 17, 2010 12:54 am

Tarpit does not send RST, it will silently drop the connection, when initiator would think that connection is actually open.
even more: it will send ACK =)
 
mhitrov
newbie
Topic Author
Posts: 34
Joined: Mon Dec 27, 2004 10:30 am

Re: Do not send RST/ACK on closed port

Wed Nov 17, 2010 1:39 pm

Can I post here an animation GIF?
People seems to not have enough patience to read an understand what is written
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Do not send RST/ACK on closed port

Wed Nov 17, 2010 4:36 pm

There is no such setting in Linux. It's a FreeBSD setting. RouterOS is based on Linux, so it doesn't have that option either. The closest thing is 'drop' in the firewall rules of iptables.

Test it by going to any Linux machine and running "sysctl -a | grep blackhole", or digging through that filtered for "tcp". There's no such option.
 
mhitrov
newbie
Topic Author
Posts: 34
Joined: Mon Dec 27, 2004 10:30 am

Re: Do not send RST/ACK on closed port

Wed Nov 17, 2010 4:53 pm

Fair enough,
thanks

Who is online

Users browsing this forum: No registered users and 31 guests