Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Jan 2002 21:58:15 -0800
From:      Danny Howard <dannyman@toldme.com>
To:        Nader Turki <nturki@hotmail.com>
Cc:        questions@FreeBSD.org
Subject:   Re: natd
Message-ID:  <20020109215815.T29850@pianosa.catch22.org>
In-Reply-To: <F112Xi5PFOyDiS7xfrD0000f550@hotmail.com>; from nturki@hotmail.com on Thu, Jan 10, 2002 at 12:44:20AM -0500
References:  <F112Xi5PFOyDiS7xfrD0000f550@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 10, 2002 at 12:44:20AM -0500, Nader Turki wrote:
> hello all,
> 
> i am trying to setup natd on my freebsd box at home so i can connec more 
> than 1 pc. my roomate got verizon adsl he bought a linksys adsl router so we 
> connect more than 1 pc.
> 
> anyway, i have an old box and wanna try to have my own network so i learn 
> more about freebsd. here's the info:
> 
> i am connected through the router i have ip "196.168.1.10"
> now i wanna use the freebsd box as a gateway and connect my win2k machine to 
> it.

Check out
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/natd.html ...

[...]
> and this is my /etc/rc.conf:
> 
> defaultrouter="192.168.1.1"
> hostname="box.venix.net"
> ifconfig_dc0="inet 192.168.1.10  netmask 255.255.255.0"
> linux_enable="YES"
> sendmail_enable="NO"
> sshd_enable="YES"
> 
> gateway_enable="YES"
> firewall_enable="YES"
> firewall_script="/etc/rc.firewall"
> firewall_type="open"
> firewall_quiet="NO"
> natd_program="/sbin/natd"
> natd_enable="YES"
> natd_interface="dc0"
> natd_flags="-f /etc/natd.conf"
> tcp_drop_synfin="YES"
> 
> 
> i have 2 nic's one is dc0 and another is dc1

Well, dc1 should probably talk to your NAT network.  Something like:
ifconfig_dc1="inet 10.0.0.1 netmask 255.0.0.0"

That gives you a "slash 8" network starting at 10.0.0.1.  The /8 means
that you only use 8 bits for the netmask, so only the first byte is
255.  What netmask 255.0.0.0, or /8 means, is that you have the other
three bytes of the reserved /8 10.net for your network, so your Win2k
box could have most IP addresses between 10.0.0.2 and 10.255.255.254.

> the freebsd bot is online but i have no idea how to connect my win2k pc to 
> the net using the freebsd as gateway.
> 
> i'd appreciate it if someone can help me.

Please, to RTFM.  Once you think you've gotten most of the way there,
and you still can't figure out what's broken, ping us again.  The NAT
setup can be tricky, even when you think you understand what you're
doing.

As you debug things here, use ping.  You'll have weird combinations of
firewall rules, NAT, and plain old TCP/IP configuration to figure out
here. :)

Good luck!
-danny

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?20020109215815.T29850>