Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Jul 2002 12:22:04 -0500 (CDT)
From:      Nick Rogness <nick@rogness.net>
To:        Juan Francisco Rodriguez Hervella <jrh@it.uc3m.es>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Problems with local port redirection with natd
Message-ID:  <Pine.BSF.4.21.0207081217010.81370-100000@cody.jharris.com>
In-Reply-To: <3D298FC7.7878C795@it.uc3m.es>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 8 Jul 2002, Juan Francisco Rodriguez Hervella wrote:

> Hello:
> 
> I've got a http server running in port 80, as usual, but there is a
> firewall in my network which doesn't allow such a port, it only
> permits connections to port 6667. Yes, it's strange, but that is what
> I've got.
> 
> I would like to redirect the connections of this form:
> 
> http://my.server.com:6667
> 
> to this:
> 
> http://my.server.com:80
> 
> Yes, I also know that I could have the Apache listening on port 6667,
> but I'd like to learn how can I do such a redirection with my
> FreeBSD-4.5
> 
> Im trying to use "natd". I've recompiled the kernel and follow the
> steps
> 
> indicated in "man natd".
> 
> I've got the following rules:
> 
> 00100 allow ip from any to any
> 00200 divert 8668 ip from any to any via fxp0
> 65535 deny ip from any to any
> 
> And "natd" is running like this:
> 
> root@mira:~# ps axwww | grep natd
>  1235  ??  Ss     0:00.00 natd -interface fxp0 -redirect_port tcp
> localhost:80 6667
> 
> I've also tried with the IP address and the server name instead of
> "localhost", without success. When I try "telnet localhost 6667"
> nothing happens.
> 

	You need to test this from the outside, ie outside your fxp0
	network.  When you telnet localhost 6667 on your BSD machine, the
	divert rule in your firewall never gets hit because it never
	traverses interface fxp0.


Nick Rogness <nick@rogness.net>
 - Don't mind me...I'm just sniffing your packets



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0207081217010.81370-100000>