Re: FreeBSD routing between 2 interfaces

2003-10-01 Thread Harald Schmalzbauer
[EMAIL PROTECTED] wrote:

Dear FreeBSD users,

I urgenly need to connect 192.168.1.* network to the internet. What am I
doing wrong?
I have 2 networks, 192.168.0.* and 192.168.1.*
FreeBSD 5.1 is connected to both networks via 2 network cards, its ip is 
192.168.0.3 and 192.168.1.2.
As of now from the 192.168.1 network I can only ping the 192.168.0.1 and
192.168.0.3 machines. Nothing else. No Internet.

Rc.conf =   gateway_enable=YES, defaultrouter=192.168.0.1,
firewall_script=/etc/ipfw.rules
ipfw.rules =ipfw add pipe 1 ip from any to any in recv dc0
ipfw add pipe 2 ip from any to any out xmit dc0
ipfw pipe 1 config mask src-ip 0x bw 1024kbits/s
ipfw pipe 2 config mask dst-ip 0x bw 1024kbits/s
   Internet
   |
  192.168.0.1
Router/DHCP Server/Switch
   |
|
|
-
|   |
   |   |
|(FreeBSD 5.1 Machine - DNS/Web Server/Samba Server)
192.168.0.* clients 192.168.0.3(xl0)
192.168.1.2(dc0) (Limit Bandwidth to 192.168.1.* on this
network(dc0) card to 1024kbits max)
|
|
   Router/Switch/DHCP server
|
|
192.168.1.* clients
 

Hmm, are you sure your DHCP assigns the correct /24 mask?
Why don't you use 255.255.0.0 as subnet mask?
Haven't played with IPFW for years now so I can't say anything about 
your rules.

-Harry

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]
 



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD routing between 2 interfaces

2003-09-30 Thread David Kelly
On Tuesday 30 September 2003 08:33 pm, [EMAIL PROTECTED] 
wrote:
 Dear FreeBSD users,

 I urgenly need to connect 192.168.1.* network to the internet. What
 am I doing wrong?

[...]

You forgot natd.

Am guessing your DSL or cable modem is doing NAT and assigning an 
address to your FreeBSD system. The modem will only accept traffic from 
the IP address it gave your machine. So when your other network routes 
thru the FreeBSD machine the modem igores it. Use natd to map that 
network traffic to the FreeBSD machine's external IP address.

-- 
David Kelly N4HHE, [EMAIL PROTECTED]
=
The human mind ordinarily operates at only ten percent of its
capacity -- the rest is overhead for the operating system.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD routing between 2 interfaces

2003-09-30 Thread freebsd
 You forgot natd.

 Am guessing your DSL or cable modem is doing NAT and assigning an
 address to your FreeBSD system.

No the modem assigns IP to the 192.168.0.1 router, which in turn acts as
gateway for the rest of the network. I only have 1 real IP address. It
seems I have NAT already on the 192.168.0.1 and will now have to put
another NAT scheme into 192.168.0.3 machine? Perhaps, I should just create
static routes using the route command in freebsd?

The modem will only accept traffic from
 the IP address it gave your machine. So when your other network routes
 thru the FreeBSD machine the modem igores it. Use natd to map that
 network traffic to the FreeBSD machine's external IP address.

 --
 David Kelly N4HHE, [EMAIL PROTECTED]
 =
 The human mind ordinarily operates at only ten percent of its
 capacity -- the rest is overhead for the operating system.

 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to
 [EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: FreeBSD routing between 2 interfaces

2003-09-30 Thread freebsd
Yes I realize about the 10.0... and 192.168 not being routed matter.
Previosly I always setup the network but never run out of IP address in
the same range(192.168.0.*). It happened this time. Therefore I created
the 192.168.1.* network but now it wont route. I can use NAT for that
purpose but that would defeat communication between the 192.168.1.* and
192.168.0.* networks(there are a bunch of ftp and samba file/print servers
in the 1.* network).

I mean if I use nat:
192.168.0.* Connect  192.168.1.* = No success
192.168.0.*  Connect 192.168.1.* = Success

 On Tuesday, 30 September 2003 at 21:33:43 -0400,
 [EMAIL PROTECTED] wrote:
 Dear FreeBSD users,

 I urgenly need to connect 192.168.1.* network to the internet. What
 am I doing wrong?

 You're assuming it's possible.  It's not.  Addresses in the range
 192.168.x.x are explicitly not routed.  See RFC 1918
 (http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1918.html) for further
 details.

 You're not very clear about your router, but I assume it does NAT for
 you: to connect an RFC 1918 network to the Internet, you need to use
 some form of Network Address Translation (NAT).  Theoretically, you'd
 need to do the same at the junction between the 192.168.0.x and
 192.168.1.x networks, though you might be able to fake things by
 choosing 23 bit net masks.  If this doesn't mean anything to you,
 don't ask.

 Greg
 --
 When replying to this message, please copy the original recipients.
 If you don't, I may ignore the reply or reply to the original recipients.
 For more information, see http://www.lemis.com/questions.html
 See complete headers for address and phone numbers.
 NOTE: Due to the currently active Microsoft-based worms, I am limiting
 all incoming mail to 131,072 bytes.  This is enough for normal mail,
 but not for large attachments.  Please send these as URLs.


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]