From owner-freebsd-net Tue May 16 1:57: 7 2000 Delivered-To: freebsd-net@freebsd.org Received: from storm.FreeBSD.org.uk (storm.freebsd.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 20B7D37B78C for ; Tue, 16 May 2000 01:57:04 -0700 (PDT) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (hak.nat.Awfulhak.org [172.31.0.12]) by storm.FreeBSD.org.uk (8.9.3/8.9.3) with ESMTP id JAA73517; Tue, 16 May 2000 09:57:01 +0100 (BST) (envelope-from brian@Awfulhak.org) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.9.3/8.9.3) with ESMTP id IAA00469; Tue, 16 May 2000 08:42:23 +0100 (BST) (envelope-from brian@hak.lan.Awfulhak.org) Message-Id: <200005160742.IAA00469@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.1.1 10/15/1999 To: Marc Tardif Cc: Brian Somers , freebsd-net@FreeBSD.ORG, brian@hak.lan.awfulhak.org, brian@hak.lan.awfulhak.org Subject: Re: ppp filter In-Reply-To: Message from Marc Tardif of "Mon, 15 May 2000 23:06:55 EDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 16 May 2000 08:42:23 +0100 From: Brian Somers Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > I have gone back to the ppp manpage and read the "ppp command" section > (line 1711) and tried the following commands from ppp: > > PPP ON fbsd> nat enable yes > PPP ON fbsd> nat port tcp 192.168.0.2:80 80 > > Still doesn't work though, visitors keep getting the www server on host > fbsd instead of being redirected to fbsd2 (even after hitting reload, in > case the page was cached). Note that I only want www services redirected, > so I don't think I can use the "nat addr" command. Considering my network > setup is rather simple and I've recently cvsup'ed to stable, I really > don't see what could be wrong. Any other ideas would be most welcome. Strange, I've got nat enable yes nat port tcp dev:http http nat port tcp dev:ident ident nat port tcp gate:22 2201 nat port tcp dev:22 2205 nat port tcp rivet:22 2206 nat port tcp hak:22 2212 nat target default in my config and everything works as expected. The only thing I can suggest you do is try ``nat log yes'' and see if anything interesting turns up in /var/log/alias.log. > > You need the ``nat port'' command. > > > > nat port tcp fbsd2.box.com:80 80 > > > > > How can I redirect www requests from the modem interface on one host to > > > another host on my local network? > > > > > > My current network consists of the following machines, where the "fbsd" > > > host also has a modem interface (tun0) with the static IP 1.1.1.1 (for > > > discussion's sake): > > > 192.168.0.1 fbsd.box.com fbsd > > > 192.168.0.2 fbsd2.box.com fbsd2 > > > > > > What I have tried so far is to connect to my isp using ppp and the nat > > > flag and then setting a filter as follows: > > > fbsd# ppp -nat isp > > > ppp ON fbsd> dial > > > PPP ON fbsd> set filter in 0 permit 1.1.1.1 192.168.0.2 tcp src eq 80 dst > > > eq 80 > > > > > > Unfortunately, once I set the filter, I cannot ping anywhere outside my > > > local network so I cannot put tcpdump to good use. Any suggestions to > > > either solve the problem or help get anywhere with this problem would be > > > much appreciated. > > > > > > Marc Tardif -- Brian Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message