Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Feb 1999 16:45:17 -0500 (EST)
From:      "Abraham J. Stephens" <stephea@aasis.albany-academy.org>
To:        freebsd-questions@freebsd.org
Subject:   two way natd question.
Message-ID:  <199902222145.QAA14070@aasis.albany-academy.org>

next in thread | raw e-mail | index | archive | help
 I have a sun box sitting on a private network (10.0.0.0) I would like to (by
using natd on a freebsd box):

1) be able to access the rest of the world from the sun, 
2) be able to access specific ports on the sun from the rest of the world. 

(I need to run a mail, pop3, and web server on the sun.)

If I have the following configuration on a freebsd box (running 2.2.5):
ed0: 205.181.13.180
ed1: 10.0.0.8

and ipfw:
300 divert 6668 ip from any to any via ed0
400 divert 6668 ip from any to any via ed1
500 allow ip from any to any

Then if I execute the command on the freebsd box
natd -same_ports -use_sockets -interface ed0 -redirect_address 10.0.0.8 0.0.0.0

I am able to access the rest of the 205.181.13.0 network from the sun box
sitting on the 10.0.0.0 network.

If instead I execute:

natd -same_ports -use_sockets -interface ed1 -redirect_port tcp 10.0.0.6:80 \
205.181.13.180:80 

(the sun's ip address is 10.0.0.8) 
I am able to connect to the web server on the sun via 205.181.13.180:80.

I'd like to be able to do both at the same time. Is this possible? If so how
can I go about doing it- I've been taking shots in the dark up to this point. I
tried simply combining the two commands but that didn't seem to work...

-Thanks

Abraham J. Stephens


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?199902222145.QAA14070>