Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Dec 2002 22:48:35 -0500 (EST)
From:      Fuzzy <fuzzy@pooh.ASARian.org>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Help setting up natd on FreeBSD 4.7-release.
Message-ID:  <Pine.BSF.4.44.0212092243300.5454-100000@pooh.ASARian.org>

next in thread | raw e-mail | index | archive | help


FreeBSD pooh.ASARian.org 4.7-RELEASE FreeBSD 4.7-RELEASE #0:
Internet Software Consortium DHCP Client V3.0pl1
smbclient 2.2.2

I have 2 NICs in the server, (one is on a 10bT
hub along with with the ADSL modem and 2 win98se
boxes, the other is on a 100bTx/10bT hub with a
cable modem, (nc.rr.com, Time Warner cable /
Roadrunner and a single win98se box. The cable
modem provides 2 DHCP served dynamic IPs).

I managed to get FBSD to use one of the external
DHCP served IPs as the servers main IP address,
and it appears to be running correctly now.

Now I need to make the 2 windows boxes with RFC1918
addresses accessable via NAT and relayed thru the
FBSD 4.7-rel's connection to the cable modem.

                       hub1

[windows 98se      ] <--+--> [FreeBSD 4.7] <----> { to hub2 }
[tigger.asarian.org]    |
 192.168.150.5          |
                        |
[ADSL Modem-Verizon] <--+
[ offline          ]    |
			|
			|
[windows 98se      ] <--+
[piglet.asarian.org]    |
 192.168.150.6          |
			|
[FreeBSD 4.7-rel  ]  <--+
[RFC1918: RL0     ]
[pooh1.asarian.org]
 192.168.150.1
{ subnet: 192.168.150.0/29 }



                        hub2

{ to hub1 }    <---------+
                         |
                         +--> [cable modem]
                         |
                         +--> [windows 88se      ]
                         |    [DHCP dynamic IP   ]
                         |    [eeyore.asarian.org]
                         |
                         |
                         +--> [FBSD 4.7-rel      ]
                              [public: rl0       ]
                              66.26.76.83
                              [pooh.asarian.org  ]

I modified the kernel and rebuilt it, (diff at end).

then issued the following commands:

/sbin/ifconfig rl0 inet 192.168.150.1 netmask 255.255.255.248
/sbin/ipfw add 1000 divert 1326 ip from any to any via rl0
/sbin/natd -s -m -u -p 1326 -n rl0

I setup the win98se box to treat its IP as static,
use the FBSD box as its gateway and DNS server.

I then rebooted win98se and tried to use IE to
read our website, (same box as the DNS server).

I got basic connectivity working, (I can run windows clients and connect
to the internet with them). My next problem is I need to support both
mount_smbfs and smbclient (from samba port). When the windows machine
had a public IP it was able to connect with the FBSD 4.7 system without
a problem, (I only had to type the share password on the console).

For the mount_smbfs, I just changed the -I option to the correct
IP for that machine. I don't know what I'm doing wrong.
Any thoughts would help.

I'm sure its a configuration error, I'm just lost as to
what I need to change to make it work :(?


thanks

Fuzzy


{documentation}

update to kernel config:

--- POOH2	Mon Nov  4 23:50:25 2002
+++ POOH3	Sat Dec  7 22:28:57 2002
@@ -2,7 +2,7 @@

 machine		i386
 cpu		I686_CPU
-ident		POOH2
+ident		POOH3
 maxusers	0

 #makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols
@@ -110,5 +110,5 @@
 options		IPFIREWALL_VERBOSE
 options		IPFIREWALL_DEFAULT_TO_ACCEPT
 options		INCLUDE_CONFIG_FILE
+options		IPDIVERT
 #options		NETSMB
-

ipfw list
01000 divert 1326 ip from any to any via ed0
65535 allow ip from any to any

mount_smbfs -c l -d 770 -f 660 -g wheel -u fuzzy -N \
	-I 192.168.215.5 //TIGGER/C /tc
mount_smbfs: unable to open connection: syserr = Operation timed out

/usr/bin/smbclient //tigger/c fuzzy -W ASARIAN \
	-I 192.168.215.5 -n POOH -d3
added interface ip=192.168.215.1 bcast=192.168.215.7 nmask=255.255.255.248
Client started (version 2.2.2).
Connecting to 192.168.215.5 at port 139
timeout connecting to 192.168.215.5:139
Connection to tigger failed

ifconfig
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 192.168.215.1 netmask 0xfffffff8 broadcast 192.168.215.7
	ether 00:e0:7d:a8:cf:5d
	media: Ethernet autoselect (10baseT/UTP)
	status: active
ed0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
	inet 66.26.76.83 netmask 0xfffff800 broadcast 255.255.255.255
	inet 192.168.216.1 netmask 0xfffffffc broadcast 192.168.216.3
	ether 00:00:c5:3c:39:53
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
	inet 127.0.0.1 netmask 0xff000000

grep gateway_enable /etc/rc.conf
gateway_enable="YES"

netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            66.26.72.1         UGSc       76   279937    ed0
24.163.43.145      0.0.0.0            UGHS        0      278    ed0
66.26.72/21        link#2             UC          1        0    ed0
66.26.72.1         00:07:0d:a9:a4:54  UHLW       72        0    ed0   1200
66.26.76.83        66.26.72.1         UGHS        1    15530    ed0
127.0.0.1          127.0.0.1          UH          0     3737    lo0
192.168.215/29     link#1             UC          2        0    rl0
192.168.215.5      00:c0:4f:ba:57:53  UHLW        1   215077    rl0   1157
192.168.215.7      ff:ff:ff:ff:ff:ff  UHLWb       0        4    rl0
192.168.216/30     link#2             UC          0        0    ed0




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.44.0212092243300.5454-100000>