Date: Thu, 20 Dec 2001 12:57:59 -0600 From: "Chuck Rock" <carock@epctech.com> To: <freebsd-isp@FreeBSD.ORG> Subject: RE: forwarding surfers.. Message-ID: <JDEAIDLKPMMILNJHADGCOEPEEHAA.carock@epctech.com> In-Reply-To: <MOEMIEFAGIMHBFOCOJKHAEBKGJAA.mark@amplex.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Wouldn't it be easier to use standard HTML/CGI scripting to determine the browser address, and display one page or another based on it's IP address? I think that could probably be accomplished with about 15 mintues of work, and not much thought. This is standard for many forms to record the address of the browser that is viewing it. Try searching for "CGI Environment Variables" with the quotes on Yahoo, and you'll get a lot of CGI examples you can use. Chuck -----Original Message----- From: owner-freebsd-isp@FreeBSD.ORG [mailto:owner-freebsd-isp@FreeBSD.ORG]On Behalf Of Mark Radabaugh - Amplex Sent: Wednesday, December 19, 2001 2:57 PM To: freebsd-isp@FreeBSD.ORG Subject: RE: forwarding surfers.. We do something like this with a combination of Apache and a Cisco router. On the Ethernet interface on the Cisco: ip policy route-map SUSPENDED access-list 192 permit tcp 192.168.0.0 0.0.0.255 any eq www route-map SUSPENDED permit 10 match ip address 192 set interface FastEthernet0/0 set ip next-hop 65.165.120.180 ! What this does is forward all packets with a source address anywhere in 192.168.0.0/24 and connecting to port 80 to 65.165.120.180. The next trick is getting the Unix box to accept the packets... A little packet rewriting in IPFW: rack0# ipfw show 00100 8964 881988 fwd 65.165.120.180 tcp from 192.168.0.0/24 to any 80 Any packets that arrive with a source address in the 192.168.0.0/24 get redirected to this box. Apache has a custom 404 error page. No matter what web page a customer with a 192.168.0.0/24 address requests they get the custom 404 error page ("Pay up bum - your account is toast"). Mark Radabaugh Amplex (419) 833-3635 > -----Original Message----- > From: owner-freebsd-isp@FreeBSD.ORG > [mailto:owner-freebsd-isp@FreeBSD.ORG]On Behalf Of Matiss Elsbergs > Sent: Wednesday, December 19, 2001 1:27 PM > To: freebsd-isp@FreeBSD.ORG > Subject: forwarding surfers.. > > > Hello there, fellow owners of many system processes.. > > Explanation: > > I have a web server, which must display a one page to one > network [ let's > say network A ], and the other one - to all other internet. > And, it must be > done like that: some application [ perhaps ipfw ] checks if > the IP belongs > to network A. If yes, then nothing's altered, and it goes to web page > sitting right there on let's say 159.148.108.4. If it belongs to other > Internet, [ which accesses the page by the same URL ], it > goes to let's say > 159.148.108.5. Is it possible? > > > > With best regards - > Matiss Elsbergs, > Astranet IS Hostmaster > +371 6435911 > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?JDEAIDLKPMMILNJHADGCOEPEEHAA.carock>