LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 03-02-2009, 02:43 PM   #1
mstjohn1974
Member
 
Registered: Sep 2005
Location: Albuquerque
Distribution: Ubuntu
Posts: 33

Rep: Reputation: 5
routing/nating based on http header


Hi,

I am trying to use iptables to build a firewall that inspects traffic. I want iptables to look at the http header and upon match to route/nat to specific internal ip. for example:

I have two internal webserver and the external domain is mydomain.com. I want to decide all traffic assigned to www.mydomain.com goes to 192.168.1.10 and traffic assigned to users.mydomain.com goes to 192.168.1.15.

Is that possible to do with iptables?
 
Old 03-02-2009, 03:07 PM   #2
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
why not use virtual servers under apache? it does exactly what you describe.
 
Old 03-02-2009, 03:36 PM   #3
mstjohn1974
Member
 
Registered: Sep 2005
Location: Albuquerque
Distribution: Ubuntu
Posts: 33

Original Poster
Rep: Reputation: 5
I need to have two servers, both in seperate departments
 
Old 03-02-2009, 05:04 PM   #4
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 182
Blog Entries: 1

Rep: Reputation: 35
ah, different physical servers. not sure it's possible with iptables. I think you want a load balancer of some sort. I'm not sure if squid will perform this trick but something like this might : http://haproxy.1wt.eu

I have no experience with HAProxy so I have no opinion of its capabilities. But it looks pretty cool!
 
  


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
HTTP header cookies cccc Linux - Networking 13 02-20-2009 02:19 PM
http header quantt Programming 0 11-07-2008 09:15 PM
routing and NATing mwagz Linux - Networking 1 01-31-2007 03:39 AM
How to forward packets based on HTTP header content? varange Linux - Networking 4 11-24-2006 02:39 PM
forward IP based on http IP header freibuis Linux - Security 7 08-24-2004 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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