Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.os.linux.networking > #4876

Re: Blocking IP addresses with iptables

From "Carlos E.R." <robin_listas@es.invalid>
Newsgroups comp.os.linux.networking
Subject Re: Blocking IP addresses with iptables
Date 2021-04-03 22:39 +0200
Message-ID <0d0njh-vav.ln1@Telcontar.valinor> (permalink)
References (1 earlier) <op.007i9pmwa3w0dxdave@hodgins.homeip.net> <3fgjjh-arh.ln1@Telcontar.valinor> <op.008fi0z2a3w0dxdave@hodgins.homeip.net> <97ckjh-l2a.ln1@Telcontar.valinor> <op.009foye4a3w0dxdave@hodgins.homeip.net>

Show all headers | View raw


On 03/04/2021 08.16, David W. Hodgins wrote:
> On Fri, 02 Apr 2021 16:42:49 -0400, Carlos E.R. <robin_listas@es.invalid> wrote:
>> On 02/04/2021 19.14, David W. Hodgins wrote:
>>> On Fri, 02 Apr 2021 08:49:07 -0400, Carlos E.R. <robin_listas@es.invalid> wrote:
>>>> On 02/04/2021 07.38, David W. Hodgins wrote:
>>>>> On Thu, 01 Apr 2021 15:32:46 -0400, John Smith <12345@whatismyemailaddress.xyz> wrote:
>>>>>>     I have the following iptables rule:
>>>>>>     iptables -A INPUT -p tcp -s 11.12.22/19 --dport 1234 -i eth0 -j
>>>>>> DROP
>>>>>> With this rule, what IP addresses will be blocked when trying to
>>>>>> establish a TCP connection on port 1234?
>>>>> $ ipcalc -i 11.12.22.0/19
>>>
>>>> I didn't know this tool, I just installed it. But:
>>>> cer@Telcontar:~> ipcalc -i 11.12.22.0/19
>>>> Unknown option: -i
>>>>
>>>>
>>>> I have Version 0.41
>>>
>>> Mageia 7 has ...
>>> $ ipcalc -v
>>> ipcalc 0.2.0
>>> On Mageia 8, which also has it working with -i ...
>>> $ ipcalc -v
>>> ipcalc 1.0.0
>>
>> Where did they got version 1 from? It is not on the official site:
>>
>> http://jodies.de/ipcalc-archive/
>>
>> Could you look at the package information to see if they mention another
>> URL, please?
>>
>> Could be <https://github.com/nmav/ipcalc>, but they mention version
>> 0.2.3... Ah, it is <https://gitlab.com/ipcalc/ipcalc>, that's 1.0.0
> 
> Correct. On Mageia 7 ...
> $ rpm -q -i ipcalc|grep ^URL
> URL         : https://github.com/nmav/ipcalc
> On Mageia 8 ...
> $ rpm -q -i ipcalc|grep ^URL
> URL         : https://gitlab.com/ipcalc/ipcalc
> 
> Regards, Dave Hodgins

I found (someone told me) that openSUSE also packages "netcalc" which 
contains "ipcalc" and "netcalc". Also an old version of "ipcalc", it 
does not accept "-i".

cer@Telcontar:~> rpm -qi netcalc
Name        : netcalc
Version     : 2.1.6
Release     : lp152.1.1
Architecture: x86_64
Install Date: 2021-04-03T22:27:18 CEST
Group       : Unspecified
Size        : 53782
License     : BSD-3-Clause
Signature   : DSA/SHA1, 2020-06-22T21:56:36 CEST, Key ID 382fb14c392ffa88
Source RPM  : netcalc-2.1.6-lp152.1.1.src.rpm
Build Date  : 2020-06-22T21:56:26 CEST
Build Host  : lamb22
Relocations : (not relocatable)
Vendor      : obs://build.opensuse.org/network:utilities
URL         : https://github.com/troglobit/netcalc
Summary     : IP subnet calculator
Description :
netcalc is an IP network calculator that can calcuate host IP ranges, subnet
masks, and split networks. It is a clone of sipcalc and uses the output 
format
of ipcalc.
Distribution: network:utilities / openSUSE_Leap_15.2
cer@Telcontar:~>


-- 
Cheers, Carlos.

Back to comp.os.linux.networking | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Blocking IP addresses with iptables John Smith <12345@whatismyemailaddress.xyz> - 2021-04-01 19:32 +0000
  Re: Blocking IP addresses with iptables John Smith <12345@whatismyemailaddress.xyz> - 2021-04-01 19:38 +0000
    Re: Blocking IP addresses with iptables Allodoxaphobia <trepidation@example.net> - 2021-04-02 12:58 +0000
  Re: Blocking IP addresses with iptables "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2021-04-02 01:38 -0400
    Re: Blocking IP addresses with iptables "Carlos E.R." <robin_listas@es.invalid> - 2021-04-02 14:49 +0200
      Re: Blocking IP addresses with iptables "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2021-04-02 13:14 -0400
        Re: Blocking IP addresses with iptables "Carlos E.R." <robin_listas@es.invalid> - 2021-04-02 22:42 +0200
          Re: Blocking IP addresses with iptables "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2021-04-03 02:16 -0400
            Re: Blocking IP addresses with iptables "Carlos E.R." <robin_listas@es.invalid> - 2021-04-03 22:39 +0200
              Re: Blocking IP addresses with iptables "David W. Hodgins" <dwhodgins@nomail.afraid.org> - 2021-04-03 18:02 -0400
  Re: Blocking IP addresses with iptables Marc Haber <mh+usenetspam1118@zugschl.us> - 2021-04-02 21:47 +0200
    Re: Blocking IP addresses with iptables Jorgen Grahn <grahn+nntp@snipabacken.se> - 2021-04-05 14:36 +0000
      Re: Blocking IP addresses with iptables Marc Haber <mh+usenetspam1118@zugschl.us> - 2021-04-05 20:02 +0200

csiph-web