FreeBSD Handbook : PPP and SLIP : Setting up User PPP : Final system configuration
Previous: PPP Configuration
Next: Summary

15.1.6. Final system configuration

You now have PPP configured, but there are a few more things to do before it is ready to work. They all involve editing the /etc/rc.conf file (was /etc/sysconfig).

Working from the top down in this file, make sure the ``hostname='' line is set, e.g.:

   hostname=foo.bar.com

If your ISP has supplied you with a static IP address and name, it's probably best that you use this name as your host name.

Look for the network_interfaces variable. If you want to configure your system to dial your ISP on demand, make sure the tun0 device is added to the list, otherwise remove it.

   network_interfaces="lo0 tun0"
   ifconfig_tun0=

Note, the ifconfig_tun0 variable should be empty, and a file called /etc/start_if.tun0 should be created. This file should contain the line

   ppp -auto mysystem

This script is executed at network configuration time, starting your ppp daemon in automatic mode. If you have a LAN for which this machine is a gateway, you may also wish to use the -alias switch. Refer to the manual page for further details.

Set the router program to ``NO'' with the line

   router_enable=NO            (/etc/rc.conf)
   router=NO                   (/etc/sysconfig)

It is important that the routed daemon is not started (it's started by default) as routed tends to delete the default routing table entries created by ppp.

It is probably worth your while ensuring that the ``sendmail_flags'' line does not include the ``-q'' option, otherwise sendmail will attempt to do a network lookup every now and then, possibly causing your machine to dial out. You may try:

   sendmail_flags="-bd"

The upshot of this is that you must force sendmail to re-examine the mail queue whenever the ppp link is up by typing:

   # /usr/sbin/sendmail -q

You may wish to use the !bg command in ppp.linkup to do this automatically:

1     provider:
2       delete ALL
3       add 0 0 HISADDR
4       !bg sendmail -bd -q30m

If you don't like this, it is possible to set up a "dfilter" to block SMTP traffic. Refer to the sample files for further details.

All that is left is to reboot the machine.

After rebooting, you can now either type

   # ppp

and then ``dial provider'' to start the PPP session, or, if you want ppp to establish sessions automatically when there is outbound traffic (and you haven't created the start_if.tun0 script), type

   # ppp -auto provider


FreeBSD Handbook : PPP and SLIP : Setting up User PPP : Final system configuration
Previous: PPP Configuration
Next: Summary