LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-19-2021, 03:10 PM   #1
jeremywebdev
LQ Newbie
 
Registered: Mar 2019
Posts: 12

Rep: Reputation: Disabled
iptables Blocking Requested Domain for Bind


Hi there,

Got a bit of a question here, got the following working that blocks any domain with the given string:
Code:
iptables -I INPUT -m string --string thedomain.to.block.om --algo bm -j REJECT
Works amazing but then for say expandability purposes is there any chance of being able to maybe say get it to go to some kind of list, if say because I'm getting a load of requests for a domain thats not hosted on my server if they used any other domain could I do both say?

Hope this makes sense

Using CentOS 7
 
Old 08-02-2021, 09:56 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
The problem with your rule is that it doesn't block the domain, it blocks any packet that contains that string. You should configure bind so it only accepts queries from the internet for your own domains, and only forwards requests from your local clients.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating domain name in bind problems exposing bind to internal network abhijit_mohanta Linux - Networking 1 09-03-2009 01:09 AM
creating domain name in bind problems exposing bind to internal network abhijit_mohanta Linux - Security 1 09-03-2009 01:01 AM
bind problem :bind domain not getting resolved abhijit_mohanta Linux - Networking 7 09-01-2009 03:37 AM
IPtables - block subdomains (a.domain.com, b.domain.com, c.domain.com,...) benjalien Linux - Networking 6 06-24-2009 07:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 06:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration