Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
netfilter: redirecting based on URL
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rigor
n00b
n00b


Joined: 16 Jan 2006
Posts: 9

PostPosted: Mon May 16, 2011 2:40 pm    Post subject: netfilter: redirecting based on URL Reply with quote

Hi all,

I'm currently building a router based en Gentoo.

I want to filter (using layer7) incoming URLs. Like this example:

http://www.website-1.com (internet) ---> {my router} --> (192.168.1.10) internal webserver #1
http://www.other-website-2.com (internet) ---> {my router} --> (192.168.1.11) internal webserver #2

I know I need netfilter-layer7 and iptables.

I just dont know how to put them together to make the filtering happen.

Google dosent have much on this.

Any help or shared experiance would be appreciated.

thanks,

J-F
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23062

PostPosted: Tue May 17, 2011 12:26 am    Post subject: Reply with quote

It might be easier to use a reverse proxy than to use iptables. A reverse proxy will not preserve the original IP address as seen by the logs of the internal webserver, but it is probably less error prone to set up and use. If you could dedicate two public IP addresses to hosting, then you could use regular NAT, which would preserve the original IP address and be very easy to set up.
Back to top
View user's profile Send private message
rigor
n00b
n00b


Joined: 16 Jan 2006
Posts: 9

PostPosted: Tue May 17, 2011 11:55 am    Post subject: Reply with quote

Thanks for the info.

I can see that it would be a mess and using multiple IPs would be better but for home use, when the ISP only give you 1 ip, then, something like this is needed :-)

I'll look into a reverse proxy.

Thanks.

Rigor.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum