Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 Nov 2001 15:32:33 +0100 (CET)
From:      =?iso-8859-1?q?m=20p?= <sumirati@yahoo.de>
To:        Anthony Atkielski <anthony@atkielski.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Still trying to use FreeBSD as a gateway for PPTP to DSL
Message-ID:  <20011107143233.71003.qmail@web13305.mail.yahoo.com>
In-Reply-To: <009b01c16791$8b0cb830$0a00000a@atkielski.com>

next in thread | previous in thread | raw e-mail | index | archive | help
 --- Anthony Atkielski <anthony@atkielski.com> schrieb: > m p writes:
> 
> 
> > First question: Can you ping the outside interface
> > of your FreeBSD system?
> 
> It's IP address on the LAN, you mean?  Yes.  

No, I assumed your setup looked like (before you installed the router):

Windows <-> FreeBSD <-> Internet

Your internal interface would have been the NIC between the Windows machine and
the FreeBSD machine. 
The outside interface would have been the interface between the FreeBSD machine
and the Internet. (The so called "outside interface" can be an alias on the
same NIC - but this IP is interessting.)

If you could have pinged (don't know much about grammar ;)) that interface,
your FreeBSD box was forwarding the requests. If not is was not (or not doing
NAT). For that problem I tried to help you :).


> I just couldn't get Windows to
> route traffic to the outside world through the FreeBSD system.  I wasn't sure
> whether it was Windows messing things up, or a configuration error in
> FreeBSD.
> Anyway, I guess that is a moot point now.

If you told your Windows machine that the "default gateway" should be the
internal IP of your FreeBSD machine the Windows part should not be the problem.
For the other part i tried to help :)

> 
> Of course, now I have another question:  How do I make sure that FreeBSD sees
> and picks up the router as the gateway to the outside world?  Should I hard
> code
> this in a configuration file somewhere (which one)?

_The_ central configuration file for the most of your needs ist /etc/rc.conf
What can be done with that file? Take a look at /etc/defaults/rc.conf. You
should set all values that you want to change in the file /etc/defaults/rc.conf
in the file /etc/rc.conf, because /etc/defaults/rc.conf will be a new one after
every system upgrade (but both are used at boot time to get your
configuration).

The parameter in your case is: 
defaultrouter="ip-adress-here"
Set it and reboot (or read on).

This parameter does the following at boot time
route add default ip-adresse-here
(If do it manually set it in /etc/rc.conf too or you will wonder at the next
reboot.)

> Or will running
> something
> like routed work?  

No, don't do this. (*sigh* Why everybody want do to this? Me too at my first
experience.)
routed is a "routing-daemon". It takes the information out of RIP, OSPF, BGP
and some other routing protocols to build the "best route to every host". Do
you have more than one link to the internet? Are you using the routing
protocolls internal? No? DON'T use it (but if you want to learn something about
routing give it a try. It is cheaper than a Cisco ;))

> I found that by setting the router to use DHCP (which my
> other machines ignore, but by doing this I cause the router to broadcast DNS
> information it receives over the PPTP link as well, apparently), and by
> running
> routed, it seems to fix the problem, although I don't understand why.
> 

DHCP broadcasts not only DNS but also information about the default gateway in
the subnet. routed takes this information, buildung a new routing table and
"voila" you can access the internet.

Add the DNS servers in /etc/resolv.conf and modify your /etc/rc.conf with
defaultgateway="ip-address-here" and then you can stop routed and named (which
means BIND). Because of DHCP broadcasting DNS to your local nameserver you can
resolve the names to IPs. This is not the nice way.

Anyway, YMMV applies.

Marc

__________________________________________________________________

Gesendet von Yahoo! Mail
http://mail.yahoo.de

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?20011107143233.71003.qmail>