drop fin packet with iptables ruleiptables rules to block ssh remote forwarded portsHow to test if SYN and FIN are both dropped at the same time in hping3?iptables rule to block incoming/outgoing traffic to a Xen containerWhy is our firewall (Ubuntu 8.04) rejecting the final packet (FIN, ACK, PSH) with a RSTUFW/IPTables: how to securely allow authenticated git access with githubTranslating IPTables rule to UFWiptables mysterious DROP --sport 80 [ACK FIN]Iptables - Drop or Reject the whole connectionCan iptables automatically drop established session after certain seconds?Debugging iptables and common firewall pitfalls?
Theorem won't go to multiple lines and is causing text to run off the page
Should one double the thirds or the fifth in chords?
When and why did journal article titles become descriptive, rather than creatively allusive?
Do I really need diodes to receive MIDI?
What is a "listed natural gas appliance"?
How would adding a darkvision racial trait to Dragonborn affect balance?
Is Jon mad at Ghost for some reason and is that why he won't acknowledge him?
How to give very negative feedback gracefully?
To customize a predefined symbol with different colors
What does this colon mean? It is not labeling, it is not ternary operator
Identifying a transmission to myself
Father and Son and Grandsons
Sed Usage to update GRUB file
CRT Oscilloscope - part of the plot is missing
Moving the subject of the sentence into a dangling participle
SQL Server Management Studio SSMS 18.0 General Availability release (GA) install fails
Can fracking help reduce CO2?
For a benzene shown in a skeletal structure, what does a substituent to the center of the ring mean?
What actually is the vector of angular momentum?
Which industry am I working in? Software development or financial services?
Upside-Down Pyramid Addition...REVERSED!
In Endgame, why were these characters still around?
Was there ever a Kickstart that took advantage of 68020+ instructions that would work on an A2000?
How do I tell my manager that his code review comment is wrong?
drop fin packet with iptables rule
iptables rules to block ssh remote forwarded portsHow to test if SYN and FIN are both dropped at the same time in hping3?iptables rule to block incoming/outgoing traffic to a Xen containerWhy is our firewall (Ubuntu 8.04) rejecting the final packet (FIN, ACK, PSH) with a RSTUFW/IPTables: how to securely allow authenticated git access with githubTranslating IPTables rule to UFWiptables mysterious DROP --sport 80 [ACK FIN]Iptables - Drop or Reject the whole connectionCan iptables automatically drop established session after certain seconds?Debugging iptables and common firewall pitfalls?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
Os is linux mint 19, i want to setup a rule in iptables to drop the incomming FIN packet as a response of the FIN_WAIT_2 state.
This for a given port. I want to test an application and need some connections staying in the FIN_WAIT_2 tcp state.
Firewall is ufw
iptables firewall ufw
add a comment |
Os is linux mint 19, i want to setup a rule in iptables to drop the incomming FIN packet as a response of the FIN_WAIT_2 state.
This for a given port. I want to test an application and need some connections staying in the FIN_WAIT_2 tcp state.
Firewall is ufw
iptables firewall ufw
add a comment |
Os is linux mint 19, i want to setup a rule in iptables to drop the incomming FIN packet as a response of the FIN_WAIT_2 state.
This for a given port. I want to test an application and need some connections staying in the FIN_WAIT_2 tcp state.
Firewall is ufw
iptables firewall ufw
Os is linux mint 19, i want to setup a rule in iptables to drop the incomming FIN packet as a response of the FIN_WAIT_2 state.
This for a given port. I want to test an application and need some connections staying in the FIN_WAIT_2 tcp state.
Firewall is ufw
iptables firewall ufw
iptables firewall ufw
asked Apr 23 at 9:28
reisreis
11
11
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
If you just want to drop the incoming FIN packet when you always initiate the shutdown of the connection, then a rule such as the following should suffice:
iptables -I INPUT --protocol tcp --destination-port 1337 --tcp-flags FIN FIN -j DROP
However this will mess up closing of connections by the other end of the connection. I don't think that it's possible to only drop the FIN if preceded by an ACK.
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
add a comment |
Unfortunately I haven't found any notes about checking the tcp flags in the ufw manual.
In iptables your scenario can be implemented in some complex way using the ipset, but there are some limitations. I guess, your host is the tcp client, and server port number is 1234 (free to change it).
# create the ipset list for fin_wait sockets.
# every entry is tuple (local-ip,local-port,remote-ip)
ipset create fin_wait hash:ip,port,ip timeout 3000
# if local host sends the fin packet inside established connection
# add entry into fin_wait list
iptables -A OUTPUT
-p tcp --tcp-flags FIN FIN
--dport 1234
-m conntrack --ctstate ESTABLISHED
-j SET --add-set fin_wait src,src,dst --exist
# if local host receives the fin packet for fin wait socket
# drop it before tcp stack processing
iptables -A INPUT
-p tcp --tcp-flags FIN FIN
--sport 1234
-m set --match-set fin_wait dst,dst,src
-j DROP
For server there is difference.
# create list for test clients
ipset create test_clients hash:ip
# add addresses of test clients
ipset add test_clients 192.168.100.10
# create list for clients in fin wait state
# server ip,port is known, so ip,port type is enough
ipset create fin_wait_clients hash:ip,port timeout 3000
# if server receives fin from test client
# add client's ip,port into set
iptables -A INPUT -p tcp
--dport 1234
--tcp-flags FIN FIN
-m set --match-set test_clients src
-j SET --add-set fin_wait_clients src,src --exist
# if server sends fin to test client as reply
# block this fin
iptables -A OUTPUT -p tcp
--sport 1234
--tcp-flags FIN FIN
-m set --match-set fin_wait_clients dst,dst
-j DROP
Some notes:
Use
ipset list fin_wait
command to list the current blocked entries from iptables' point of viewUse
ss -t4 state fin-wait-2
command to list sockets in fin wait 2 stateOrder of rules is very important.
Better use the iptables-save / iptables-restore / iptables-apply tools to safety rule set changing.
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding--dport <NUM>
/--sport <NUM>
intoOUTPUT
/INPUT
rules.
– Anton Danilov
Apr 23 at 13:43
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
|
show 17 more comments
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964178%2fdrop-fin-packet-with-iptables-rule%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If you just want to drop the incoming FIN packet when you always initiate the shutdown of the connection, then a rule such as the following should suffice:
iptables -I INPUT --protocol tcp --destination-port 1337 --tcp-flags FIN FIN -j DROP
However this will mess up closing of connections by the other end of the connection. I don't think that it's possible to only drop the FIN if preceded by an ACK.
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
add a comment |
If you just want to drop the incoming FIN packet when you always initiate the shutdown of the connection, then a rule such as the following should suffice:
iptables -I INPUT --protocol tcp --destination-port 1337 --tcp-flags FIN FIN -j DROP
However this will mess up closing of connections by the other end of the connection. I don't think that it's possible to only drop the FIN if preceded by an ACK.
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
add a comment |
If you just want to drop the incoming FIN packet when you always initiate the shutdown of the connection, then a rule such as the following should suffice:
iptables -I INPUT --protocol tcp --destination-port 1337 --tcp-flags FIN FIN -j DROP
However this will mess up closing of connections by the other end of the connection. I don't think that it's possible to only drop the FIN if preceded by an ACK.
If you just want to drop the incoming FIN packet when you always initiate the shutdown of the connection, then a rule such as the following should suffice:
iptables -I INPUT --protocol tcp --destination-port 1337 --tcp-flags FIN FIN -j DROP
However this will mess up closing of connections by the other end of the connection. I don't think that it's possible to only drop the FIN if preceded by an ACK.
answered Apr 23 at 11:31
wurtelwurtel
3,038512
3,038512
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
add a comment |
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
At the client site the connection stays in FIN_WAIT1. This is one of the states i want the client to stay in for testing purpose.
– reis
Apr 24 at 5:34
add a comment |
Unfortunately I haven't found any notes about checking the tcp flags in the ufw manual.
In iptables your scenario can be implemented in some complex way using the ipset, but there are some limitations. I guess, your host is the tcp client, and server port number is 1234 (free to change it).
# create the ipset list for fin_wait sockets.
# every entry is tuple (local-ip,local-port,remote-ip)
ipset create fin_wait hash:ip,port,ip timeout 3000
# if local host sends the fin packet inside established connection
# add entry into fin_wait list
iptables -A OUTPUT
-p tcp --tcp-flags FIN FIN
--dport 1234
-m conntrack --ctstate ESTABLISHED
-j SET --add-set fin_wait src,src,dst --exist
# if local host receives the fin packet for fin wait socket
# drop it before tcp stack processing
iptables -A INPUT
-p tcp --tcp-flags FIN FIN
--sport 1234
-m set --match-set fin_wait dst,dst,src
-j DROP
For server there is difference.
# create list for test clients
ipset create test_clients hash:ip
# add addresses of test clients
ipset add test_clients 192.168.100.10
# create list for clients in fin wait state
# server ip,port is known, so ip,port type is enough
ipset create fin_wait_clients hash:ip,port timeout 3000
# if server receives fin from test client
# add client's ip,port into set
iptables -A INPUT -p tcp
--dport 1234
--tcp-flags FIN FIN
-m set --match-set test_clients src
-j SET --add-set fin_wait_clients src,src --exist
# if server sends fin to test client as reply
# block this fin
iptables -A OUTPUT -p tcp
--sport 1234
--tcp-flags FIN FIN
-m set --match-set fin_wait_clients dst,dst
-j DROP
Some notes:
Use
ipset list fin_wait
command to list the current blocked entries from iptables' point of viewUse
ss -t4 state fin-wait-2
command to list sockets in fin wait 2 stateOrder of rules is very important.
Better use the iptables-save / iptables-restore / iptables-apply tools to safety rule set changing.
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding--dport <NUM>
/--sport <NUM>
intoOUTPUT
/INPUT
rules.
– Anton Danilov
Apr 23 at 13:43
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
|
show 17 more comments
Unfortunately I haven't found any notes about checking the tcp flags in the ufw manual.
In iptables your scenario can be implemented in some complex way using the ipset, but there are some limitations. I guess, your host is the tcp client, and server port number is 1234 (free to change it).
# create the ipset list for fin_wait sockets.
# every entry is tuple (local-ip,local-port,remote-ip)
ipset create fin_wait hash:ip,port,ip timeout 3000
# if local host sends the fin packet inside established connection
# add entry into fin_wait list
iptables -A OUTPUT
-p tcp --tcp-flags FIN FIN
--dport 1234
-m conntrack --ctstate ESTABLISHED
-j SET --add-set fin_wait src,src,dst --exist
# if local host receives the fin packet for fin wait socket
# drop it before tcp stack processing
iptables -A INPUT
-p tcp --tcp-flags FIN FIN
--sport 1234
-m set --match-set fin_wait dst,dst,src
-j DROP
For server there is difference.
# create list for test clients
ipset create test_clients hash:ip
# add addresses of test clients
ipset add test_clients 192.168.100.10
# create list for clients in fin wait state
# server ip,port is known, so ip,port type is enough
ipset create fin_wait_clients hash:ip,port timeout 3000
# if server receives fin from test client
# add client's ip,port into set
iptables -A INPUT -p tcp
--dport 1234
--tcp-flags FIN FIN
-m set --match-set test_clients src
-j SET --add-set fin_wait_clients src,src --exist
# if server sends fin to test client as reply
# block this fin
iptables -A OUTPUT -p tcp
--sport 1234
--tcp-flags FIN FIN
-m set --match-set fin_wait_clients dst,dst
-j DROP
Some notes:
Use
ipset list fin_wait
command to list the current blocked entries from iptables' point of viewUse
ss -t4 state fin-wait-2
command to list sockets in fin wait 2 stateOrder of rules is very important.
Better use the iptables-save / iptables-restore / iptables-apply tools to safety rule set changing.
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding--dport <NUM>
/--sport <NUM>
intoOUTPUT
/INPUT
rules.
– Anton Danilov
Apr 23 at 13:43
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
|
show 17 more comments
Unfortunately I haven't found any notes about checking the tcp flags in the ufw manual.
In iptables your scenario can be implemented in some complex way using the ipset, but there are some limitations. I guess, your host is the tcp client, and server port number is 1234 (free to change it).
# create the ipset list for fin_wait sockets.
# every entry is tuple (local-ip,local-port,remote-ip)
ipset create fin_wait hash:ip,port,ip timeout 3000
# if local host sends the fin packet inside established connection
# add entry into fin_wait list
iptables -A OUTPUT
-p tcp --tcp-flags FIN FIN
--dport 1234
-m conntrack --ctstate ESTABLISHED
-j SET --add-set fin_wait src,src,dst --exist
# if local host receives the fin packet for fin wait socket
# drop it before tcp stack processing
iptables -A INPUT
-p tcp --tcp-flags FIN FIN
--sport 1234
-m set --match-set fin_wait dst,dst,src
-j DROP
For server there is difference.
# create list for test clients
ipset create test_clients hash:ip
# add addresses of test clients
ipset add test_clients 192.168.100.10
# create list for clients in fin wait state
# server ip,port is known, so ip,port type is enough
ipset create fin_wait_clients hash:ip,port timeout 3000
# if server receives fin from test client
# add client's ip,port into set
iptables -A INPUT -p tcp
--dport 1234
--tcp-flags FIN FIN
-m set --match-set test_clients src
-j SET --add-set fin_wait_clients src,src --exist
# if server sends fin to test client as reply
# block this fin
iptables -A OUTPUT -p tcp
--sport 1234
--tcp-flags FIN FIN
-m set --match-set fin_wait_clients dst,dst
-j DROP
Some notes:
Use
ipset list fin_wait
command to list the current blocked entries from iptables' point of viewUse
ss -t4 state fin-wait-2
command to list sockets in fin wait 2 stateOrder of rules is very important.
Better use the iptables-save / iptables-restore / iptables-apply tools to safety rule set changing.
Unfortunately I haven't found any notes about checking the tcp flags in the ufw manual.
In iptables your scenario can be implemented in some complex way using the ipset, but there are some limitations. I guess, your host is the tcp client, and server port number is 1234 (free to change it).
# create the ipset list for fin_wait sockets.
# every entry is tuple (local-ip,local-port,remote-ip)
ipset create fin_wait hash:ip,port,ip timeout 3000
# if local host sends the fin packet inside established connection
# add entry into fin_wait list
iptables -A OUTPUT
-p tcp --tcp-flags FIN FIN
--dport 1234
-m conntrack --ctstate ESTABLISHED
-j SET --add-set fin_wait src,src,dst --exist
# if local host receives the fin packet for fin wait socket
# drop it before tcp stack processing
iptables -A INPUT
-p tcp --tcp-flags FIN FIN
--sport 1234
-m set --match-set fin_wait dst,dst,src
-j DROP
For server there is difference.
# create list for test clients
ipset create test_clients hash:ip
# add addresses of test clients
ipset add test_clients 192.168.100.10
# create list for clients in fin wait state
# server ip,port is known, so ip,port type is enough
ipset create fin_wait_clients hash:ip,port timeout 3000
# if server receives fin from test client
# add client's ip,port into set
iptables -A INPUT -p tcp
--dport 1234
--tcp-flags FIN FIN
-m set --match-set test_clients src
-j SET --add-set fin_wait_clients src,src --exist
# if server sends fin to test client as reply
# block this fin
iptables -A OUTPUT -p tcp
--sport 1234
--tcp-flags FIN FIN
-m set --match-set fin_wait_clients dst,dst
-j DROP
Some notes:
Use
ipset list fin_wait
command to list the current blocked entries from iptables' point of viewUse
ss -t4 state fin-wait-2
command to list sockets in fin wait 2 stateOrder of rules is very important.
Better use the iptables-save / iptables-restore / iptables-apply tools to safety rule set changing.
edited Apr 24 at 8:09
answered Apr 23 at 12:05
Anton DanilovAnton Danilov
58625
58625
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding--dport <NUM>
/--sport <NUM>
intoOUTPUT
/INPUT
rules.
– Anton Danilov
Apr 23 at 13:43
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
|
show 17 more comments
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding--dport <NUM>
/--sport <NUM>
intoOUTPUT
/INPUT
rules.
– Anton Danilov
Apr 23 at 13:43
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
i don't see the 'ss -t4 ...' part of the rule, should it be part of the rule? Can you please add a destination port for which the rule is valid?
– reis
Apr 23 at 13:39
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding --dport <NUM>
/ --sport <NUM>
into OUTPUT
/ INPUT
rules.– Anton Danilov
Apr 23 at 13:43
ss -t4 state fin-wait-2
isn't a part of any rule, it's a separate command to list sockets in a host system. Most suitable set type is ip.port,ip, so there isn't way to use full 4-elements tuples and destination port, but you can add the server side port number with adding --dport <NUM>
/ --sport <NUM>
into OUTPUT
/ INPUT
rules.– Anton Danilov
Apr 23 at 13:43
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
>>> I guess, your host is the tcp client, and server port number is 1234. I want to apply the rules at the server. So the incomming connection is at port 20000 in this case. I've added the rules but I don't see any blocked entries. Something wrong with INPUT and OUTPUT?
– reis
Apr 24 at 5:54
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
For server need other rules. I'll edit the answer to provide the rules for server too. I've written rules for client because you asked about client, not server.
– Anton Danilov
Apr 24 at 6:49
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
I've got a "bad argument 'test_clients' '" probably because of the line "-m set test_clients src"
– reis
Apr 24 at 8:04
|
show 17 more comments
Thanks for contributing an answer to Server Fault!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f964178%2fdrop-fin-packet-with-iptables-rule%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown