LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 05-13-2006, 12:13 AM   #1
Ammad
Member
 
Registered: Apr 2004
Distribution: redhat 9.0, fc4, redhat as 4
Posts: 522

Rep: Reputation: 31
firewall and virtualhosting


i am blocking a website by router using acl but when i browse it, it isn't block. i defined all ip address.
To solve the problem i used dns. the websever is servring name base virtual hosting. Is there any way to block it using name by iptables.

e.g
iptables -I INPUT -s *.contoso.com -j DROP
 
Old 05-13-2006, 05:25 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Iptables only deals with IPs. You need to use a proxy server to handle hostnames.

Brian1
 
Old 05-14-2006, 10:52 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Brian1,
I beg to differ -- from the iptables man page on my MEPIS 3.3.2 system: "Source specification. Address can be either a network name, a hostname (please note that specifying any name to be resolved with a remote query such as DNS is a really bad idea), a network IP address (with /mask), or a plain IP address."

Ammad,
It looks like your rule would work fine, but note the warning in the man page.

BTW, which DNS server program are you using?
 
Old 05-14-2006, 04:06 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Correct on the hostname, it can be used in some iptable commands. I always use IP values through out since like Rick mentions about resolving to DNS or other sources.

Brian1
 
  


Reply



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
Is this secure php setup for virtualhosting? Eggert Linux - Security 1 02-14-2006 08:21 AM
Squid and virtualhosting lil_drummaboy Linux - Networking 0 01-30-2005 04:16 AM
Multidomain virtualhosting with ssl petterg Linux - Software 12 12-06-2004 05:44 AM
Firewall Builder sample firewall policy file ? (.xml) nuwanguy Linux - Networking 0 09-13-2003 12:32 PM
ftp problems after change to virtualhosting dsiguy Linux - General 0 03-10-2003 06:24 PM

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

All times are GMT -5. The time now is 11:50 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