what does -d 0/0 mean? [closed]
I came across a rule:
iptables -A INPUT -p tcp -s 17.3.3.5/24 -d 0/0 --dport 22 -j DROP
and I was just wondering if someone could explain what this rule is doing. More importantly, I would like to know what the
-d 0/0
part means, in the whole rule (I know its destination specification, so the 0/0 part should be an IP address, but why is it 0/0?).
Im speculating that the rule is dropping that one source address when it arrives at destination port 22, but I'm not sure.
If someone could explain, that would be great.
Couldn't find an answer when searching the interwebs :C
linux security firewall iptables
closed as off-topic by that other guy, Andrey Akhmetov, jww, Tsyvarev, rene Dec 30 '18 at 20:51
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – jww, Tsyvarev, rene
- "Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – that other guy, Andrey Akhmetov
If this question can be reworded to fit the rules in the help center, please edit the question.
add a comment |
I came across a rule:
iptables -A INPUT -p tcp -s 17.3.3.5/24 -d 0/0 --dport 22 -j DROP
and I was just wondering if someone could explain what this rule is doing. More importantly, I would like to know what the
-d 0/0
part means, in the whole rule (I know its destination specification, so the 0/0 part should be an IP address, but why is it 0/0?).
Im speculating that the rule is dropping that one source address when it arrives at destination port 22, but I'm not sure.
If someone could explain, that would be great.
Couldn't find an answer when searching the interwebs :C
linux security firewall iptables
closed as off-topic by that other guy, Andrey Akhmetov, jww, Tsyvarev, rene Dec 30 '18 at 20:51
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – jww, Tsyvarev, rene
- "Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – that other guy, Andrey Akhmetov
If this question can be reworded to fit the rules in the help center, please edit the question.
1
It matches any destination. The first 0 is decimal notation for0.0.0.0
, but that doesn't really matter since the netmask is/0
– that other guy
Dec 29 '18 at 3:07
Thanks @thatotherguy ! so is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22?
– NecklessGiraffe
Dec 29 '18 at 3:16
Stack Overflow is a site for programming and development questions. You should use another site on the Stack Exchange network for this question.
– jww
Dec 29 '18 at 23:27
add a comment |
I came across a rule:
iptables -A INPUT -p tcp -s 17.3.3.5/24 -d 0/0 --dport 22 -j DROP
and I was just wondering if someone could explain what this rule is doing. More importantly, I would like to know what the
-d 0/0
part means, in the whole rule (I know its destination specification, so the 0/0 part should be an IP address, but why is it 0/0?).
Im speculating that the rule is dropping that one source address when it arrives at destination port 22, but I'm not sure.
If someone could explain, that would be great.
Couldn't find an answer when searching the interwebs :C
linux security firewall iptables
I came across a rule:
iptables -A INPUT -p tcp -s 17.3.3.5/24 -d 0/0 --dport 22 -j DROP
and I was just wondering if someone could explain what this rule is doing. More importantly, I would like to know what the
-d 0/0
part means, in the whole rule (I know its destination specification, so the 0/0 part should be an IP address, but why is it 0/0?).
Im speculating that the rule is dropping that one source address when it arrives at destination port 22, but I'm not sure.
If someone could explain, that would be great.
Couldn't find an answer when searching the interwebs :C
linux security firewall iptables
linux security firewall iptables
edited Dec 29 '18 at 2:57
NecklessGiraffe
asked Dec 29 '18 at 2:51
NecklessGiraffeNecklessGiraffe
12
12
closed as off-topic by that other guy, Andrey Akhmetov, jww, Tsyvarev, rene Dec 30 '18 at 20:51
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – jww, Tsyvarev, rene
- "Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – that other guy, Andrey Akhmetov
If this question can be reworded to fit the rules in the help center, please edit the question.
closed as off-topic by that other guy, Andrey Akhmetov, jww, Tsyvarev, rene Dec 30 '18 at 20:51
This question appears to be off-topic. The users who voted to close gave these specific reasons:
- "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming. You may be able to get help on Super User." – jww, Tsyvarev, rene
- "Questions on professional server- or networking-related infrastructure administration are off-topic for Stack Overflow unless they directly involve programming or programming tools. You may be able to get help on Server Fault." – that other guy, Andrey Akhmetov
If this question can be reworded to fit the rules in the help center, please edit the question.
1
It matches any destination. The first 0 is decimal notation for0.0.0.0
, but that doesn't really matter since the netmask is/0
– that other guy
Dec 29 '18 at 3:07
Thanks @thatotherguy ! so is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22?
– NecklessGiraffe
Dec 29 '18 at 3:16
Stack Overflow is a site for programming and development questions. You should use another site on the Stack Exchange network for this question.
– jww
Dec 29 '18 at 23:27
add a comment |
1
It matches any destination. The first 0 is decimal notation for0.0.0.0
, but that doesn't really matter since the netmask is/0
– that other guy
Dec 29 '18 at 3:07
Thanks @thatotherguy ! so is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22?
– NecklessGiraffe
Dec 29 '18 at 3:16
Stack Overflow is a site for programming and development questions. You should use another site on the Stack Exchange network for this question.
– jww
Dec 29 '18 at 23:27
1
1
It matches any destination. The first 0 is decimal notation for
0.0.0.0
, but that doesn't really matter since the netmask is /0
– that other guy
Dec 29 '18 at 3:07
It matches any destination. The first 0 is decimal notation for
0.0.0.0
, but that doesn't really matter since the netmask is /0
– that other guy
Dec 29 '18 at 3:07
Thanks @thatotherguy ! so is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22?
– NecklessGiraffe
Dec 29 '18 at 3:16
Thanks @thatotherguy ! so is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22?
– NecklessGiraffe
Dec 29 '18 at 3:16
Stack Overflow is a site for programming and development questions. You should use another site on the Stack Exchange network for this question.
– jww
Dec 29 '18 at 23:27
Stack Overflow is a site for programming and development questions. You should use another site on the Stack Exchange network for this question.
– jww
Dec 29 '18 at 23:27
add a comment |
1 Answer
1
active
oldest
votes
Just like -s 17.3.3.5/24
means any source within the CIDR block 17.3.3.5/24
, -d 0/0
means any destination within the CIDR block 0.0.0.0/0
. Since there are no bits in the network number, every address is inside this network. So it means any destination at all.
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just like -s 17.3.3.5/24
means any source within the CIDR block 17.3.3.5/24
, -d 0/0
means any destination within the CIDR block 0.0.0.0/0
. Since there are no bits in the network number, every address is inside this network. So it means any destination at all.
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
add a comment |
Just like -s 17.3.3.5/24
means any source within the CIDR block 17.3.3.5/24
, -d 0/0
means any destination within the CIDR block 0.0.0.0/0
. Since there are no bits in the network number, every address is inside this network. So it means any destination at all.
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
add a comment |
Just like -s 17.3.3.5/24
means any source within the CIDR block 17.3.3.5/24
, -d 0/0
means any destination within the CIDR block 0.0.0.0/0
. Since there are no bits in the network number, every address is inside this network. So it means any destination at all.
Just like -s 17.3.3.5/24
means any source within the CIDR block 17.3.3.5/24
, -d 0/0
means any destination within the CIDR block 0.0.0.0/0
. Since there are no bits in the network number, every address is inside this network. So it means any destination at all.
answered Dec 29 '18 at 3:16
David SchwartzDavid Schwartz
136k14143224
136k14143224
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
add a comment |
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
Thanks David!! So just to make sure I understand this, is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22? (I asked the "other guy above" :D)
– NecklessGiraffe
Dec 29 '18 at 3:30
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
It matches the exact source address 17.3.3.5 and the exact port 22 for inbound traffic. Most likely, it stops that one particular host from reaching a local service on port 22.
– David Schwartz
Dec 29 '18 at 3:37
add a comment |
1
It matches any destination. The first 0 is decimal notation for
0.0.0.0
, but that doesn't really matter since the netmask is/0
– that other guy
Dec 29 '18 at 3:07
Thanks @thatotherguy ! so is the rule dropping the IP address 17.3.3.5/24 when it arrives at any destination IP with port 22?
– NecklessGiraffe
Dec 29 '18 at 3:16
Stack Overflow is a site for programming and development questions. You should use another site on the Stack Exchange network for this question.
– jww
Dec 29 '18 at 23:27