Networking Forums

Networking Forums > Computer Networking > Linux Networking > Dropping incoming connections from a given domain

Reply
Thread Tools Display Modes

Dropping incoming connections from a given domain

 
 
S.K.R. de Jong
Guest
Posts: n/a

 
      06-16-2011, 07:35 PM
I am looking for an iptables incantation that would allow all
connection attempts from IP addresses in a given domain. Is this possible?

 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      06-16-2011, 08:25 PM
Hello,

S.K.R. de Jong a écrit :
> I am looking for an iptables incantation that would allow all
> connection attempts from IP addresses in a given domain. Is this possible?


What do you mean by "IP addresses in a given domain" ?

If you mean the reverse DNS being in a given domain, not easily.
Iptables rules are run by the kernel and the kernel knows nothing about
DNS. You would need to QUEUE packets and do the reverse DNS resolution
in userland.
 
Reply With Quote
 
Rick Jones
Guest
Posts: n/a

 
      06-16-2011, 08:29 PM
Pascal Hambourg <boite-a-(E-Mail Removed)> wrote:
> S.K.R. de Jong a écrit :


> > I am looking for an iptables incantation that would allow
> > all connection attempts from IP addresses in a given domain. Is
> > this possible?


> What do you mean by "IP addresses in a given domain" ?


> If you mean the reverse DNS being in a given domain, not easily.
> Iptables rules are run by the kernel and the kernel knows nothing about
> DNS. You would need to QUEUE packets and do the reverse DNS resolution
> in userland.


And if the conversations in one of the DNS lists are indicative of the
future, it may be increasingly rare that there are PTR records in the
DNS in the first place - there seems to be resistance to adding them
for IPv6.

rick jones
--
The computing industry isn't as much a game of "Follow The Leader" as
it is one of "Ring Around the Rosy" or perhaps "Duck Duck Goose."
- Rick Jones
these opinions are mine, all mine; HP might not want them anyway...
feel free to post, OR email to rick.jones2 in hp.com but NOT BOTH...
 
Reply With Quote
 
S.K.R. de Jong
Guest
Posts: n/a

 
      06-17-2011, 12:12 AM
On Thu, 16 Jun 2011 22:25:38 +0200, Pascal Hambourg wrote:

> Hello,
>
> S.K.R. de Jong a écrit :
>> I am looking for an iptables incantation that would allow all
>> connection attempts from IP addresses in a given domain. Is this
>> possible?

>
> What do you mean by "IP addresses in a given domain" ?
>
> If you mean the reverse DNS being in a given domain, not easily.
> Iptables rules are run by the kernel and the kernel knows nothing about
> DNS. You would need to QUEUE packets and do the reverse DNS resolution
> in userland.


In that case, can it be done on the basis of matching IP
addresses? For instance, would it be possible to get iptables to discard
packets from, say, 192.168.xxx.yyy, where xxx and yyy are integers
between 0 and 255?
 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      06-17-2011, 07:08 AM
S.K.R. de Jong a écrit :
>
> In that case, can it be done on the basis of matching IP
> addresses? For instance, would it be possible to get iptables to discard
> packets from, say, 192.168.xxx.yyy, where xxx and yyy are integers
> between 0 and 255?


Of course. This is basic.
You can match a prefix :

iptables -A INPUT -s 192.168.0.0/16 -j DROP

or an arbitrary range :

iptables -A INPUT -m iprange --src-range 192.168.0.0-192.168.255.255 \
-j DROP
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Remove Incoming Connections Non-Interactively SSI Windows Networking 0 10-20-2008 11:06 PM
Incoming connections after installing KB923414 Jerry Wireless Networks 0 10-20-2006 08:12 PM
How to disable the incoming connections? hxhn1 Windows Networking 1 06-13-2005 01:35 PM
Allowing Incoming Connections Vadim Berezniker Windows Networking 1 01-08-2005 06:04 PM
excessive incoming connections? bazzz777 Linux Networking 2 09-22-2003 05:47 PM



1 2 3 4 5 6 7 8 9 10 11