LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-25-2008, 11:40 AM   #1
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Rep: Reputation: 30
Two shared dhcpd subnets, how do I route the guest subnet to a web page or to squid?


I think I managed to get dhcpd working so that there are two subnets: Home subnet (fixed ip via mac address in 192.168.254.0/255.255.255.0) and Guest subnet (from dhcp range in 10.0.10.0/255.255.255.0). This is a linux box in the lan and it has only one interface. It along with the rest of the machines on the lan are connected to a Speedstream 4200 modem/router. I disabled the dhcp server in the Speedstream router and enabled it in the linux box. It currently sets the gateway and dns server for the Home subnet to the ip of the Speedstream. It also sets the gateway for the Guest subnet to the ip of the Linux box and dns server pointed to the Speedstream. I intend to do some routing in the linux box which would redirect all http requests from Guest subnet to the linux box's httpd server and eventually to a squid server running in the linux box. Does anyone have any ideas on how to achieve this?

Thanks
Chris
 
Old 08-28-2008, 05:11 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
You can do that using iptables DNAT
 
Old 08-31-2008, 10:11 PM   #3
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
Will DNAT work if there is only one interface? I know the packets are being routed to the linux box because disabling ipv4 forward causes the "guest" subnet to not have internet access.

Thanks
Chris
 
Old 08-31-2008, 10:48 PM   #4
KinnowGrower
Member
 
Registered: May 2008
Location: Toronto
Distribution: Centos && Debian
Posts: 347

Rep: Reputation: 34
Quote:
I disabled the dhcp server in the Speedstream router and enabled it in the linux box. It currently
Hi friend, I have question albit different but its only related here.

can u please tell me how to disable dhcp in 4200 ADSL modem.? I have the same modem 4200 speed stream.

Thanks
 
  


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
Sending a default web page to the connected computers through squid proxy jomy Linux - Networking 1 09-07-2007 09:39 AM
Image file get smaller in web page via Squid Proxy matthey@gich.com.hk Linux - Software 0 03-02-2007 03:46 AM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
Route to subnet exists but I get "Network unreachable" when adding default route fciuffani Linux - Networking 4 08-18-2004 02:11 PM
DHCPD two subnets on the same network taggedd Linux - Networking 4 10-27-2003 11:29 AM

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

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