LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 02-22-2013, 03:43 AM   #1
Dorron
LQ Newbie
 
Registered: May 2004
Posts: 9

Rep: Reputation: 0
IPtables/Fwbuilder: using to control incoming petitions of multiple domain names


Hi:

Got a question. I have multiple domain names registered.

Example:

domain1.com
domain2.com

Got both DNS names pointing to my routers external address in hosters DNS server (one.com) so that petitions to domain1.com and domain2.com go to the same router.

All traffic is passed from the router to a firewall machine where I want to discriminate traffic coming to domain1.com and redirect it to webserver1 and traffic coming to domain2.com to webserver2.

Is it possible to set iptables/fwbuilder to do this based on which domain name was the client asking for?

I'm having trouble with this.

Any help would be welcome.

Thanks in advance.

Dorron
 
Old 02-23-2013, 07:44 AM   #2
yowi
Member
 
Registered: Dec 2002
Location: Au
Distribution: Debian
Posts: 209

Rep: Reputation: 52
There is a string match option for iptables that may work, but it seems an ugly fix to an IP problem.

I suspect DNS could be used to specify a non-standard port for one domain and have your firewall NAT that to the appropriate box: http://www.anta.net/nic/draft-andrews-http-srv-01.shtml

Another option could be a load balancer or http proxy to redirect the requests from one web server to the other.

Last edited by yowi; 02-23-2013 at 07:49 AM.
 
Old 02-26-2013, 07:40 AM   #3
Dorron
LQ Newbie
 
Registered: May 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by yowi View Post
There is a string match option for iptables that may work, but it seems an ugly fix to an IP problem.

I suspect DNS could be used to specify a non-standard port for one domain and have your firewall NAT that to the appropriate box: http://www.anta.net/nic/draft-andrews-http-srv-01.shtml

Another option could be a load balancer or http proxy to redirect the requests from one web server to the other.
Thank you very much for your reply. Much apreciated. I will look into it as soon as possible.

Could this be done not only for web servers but for mail servers, etc????

Thank you very much!
 
  


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
samba, iptables windows names resolving not working unless open all incoming udp zininav Linux - Networking 1 02-15-2013 03:54 AM
Multiple domain names on one IP address targettl Linux - Networking 5 12-21-2009 12:11 AM
single IP multiple domain names jduckett01 Linux - Networking 2 08-26-2008 08:38 PM
multiple domain names stuffradio Slackware 1 01-11-2006 06:02 AM
Blocking Incoming e-mail from a domain using iptables Zychior Linux - Security 2 04-06-2004 12:13 PM


All times are GMT -5. The time now is 12:28 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration