From owner-freebsd-isp Thu Dec 20 10:58:16 2001 Delivered-To: freebsd-isp@freebsd.org Received: from kira.epconline.net (kira.epconline.net [207.206.185.2]) by hub.freebsd.org (Postfix) with ESMTP id C647237B417 for ; Thu, 20 Dec 2001 10:58:04 -0800 (PST) Received: from isp4 (betterguard.epconline.net [207.206.185.193]) by kira.epconline.net (8.11.4/8.11.4) with SMTP id fBKIw3x39395 for ; Thu, 20 Dec 2001 12:58:04 -0600 (CST) Reply-To: From: "Chuck Rock" To: Subject: RE: forwarding surfers.. Date: Thu, 20 Dec 2001 12:57:59 -0600 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Importance: Normal Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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