Date: Sun, 8 Dec 2002 12:04:19 -0500 (EST) From: Fuzzy <fuzzy@pooh.ASARian.org> To: freebsd-questions@FreeBSD.ORG Subject: howto setup nat? Message-ID: <Pine.BSF.4.44.0212081053180.10464-100000@pooh.ASARian.org>
next in thread | raw e-mail | index | archive | help
I discovered that the ISP I was using for ADSL
is still not available after the power returned,
(big North Carolina ice storm). 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 accessable
via NAT and relay 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 |
|
|
|
[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).
It failed.
I'm sure its a configuration error, I'm just lost as to
what I need to change to make it work :(?
Thanks in advance.
Fuzzy
[documentation]
FreeBSD pooh.ASARian.org 4.7-RELEASE FreeBSD 4.7-RELEASE #0:
Sat Dec 7 22:32:42 EST 2002
child@pooh.ASARian.org:/usr/src/sys/compile/POOH3 i386
Internet Software Consortium DHCP Client V3.0pl1
Copyright 1995-2001 Internet Software Consortium.
All rights reserved.
ifconfig output
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.150.1 netmask 0xfffffff8 broadcast 192.168.150.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
ether 00:00:c5:3c:39:53
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000
ipfw list:
01000 divert 1326 ip from any to any via rl0
65535 allow ip from any to any
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
-
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.0212081053180.10464-100000>
