Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 Dec 2001 15:57:08 -0500
From:      "Mark Radabaugh - Amplex" <mark@amplex.net>
To:        <freebsd-isp@FreeBSD.ORG>
Subject:   RE: forwarding surfers..
Message-ID:  <MOEMIEFAGIMHBFOCOJKHAEBKGJAA.mark@amplex.net>
In-Reply-To: <007c01c188ba$cb94dd70$0300a8c0@weird>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?MOEMIEFAGIMHBFOCOJKHAEBKGJAA.mark>