Establish ADSL Dial-up Gateway Server with FreeBSD

  
        

Description
In order to let everyone understand the difference between PPPoE and PPTP, so as not to cause confusion before me, let us know their usefulness. Now that we use PPPoE, it is mainly ADSL. We can regard ADSL Modem as just a dialer. It does not have network function, just use it like the native device. PPTP is a server with an IP address on the network. I know that such dial-up servers are widely used in campus networks and corporate networks for billing or security.

Installing the necessary software
Since ppp is a feature that comes with FreeBSD, mpd is a FreeBSD add-on. You can compile it using FreeBSD's Ports Collection. The latest version 3.13 mpd, using ports compilation method:

% cd /usr /ports /net /mpd
% make install
% make clean

If you don't have the Ports Collection installed, you can find the mpd3.13 package installation package in the BSD version of http://www.huangdong.com/bbs/. Package using the installation package mounting method:

% pkg_add mpd-3.13.tbz
ppp dial setting
ppp dial settings are provided in the main /etc/ppp/ppp.conf in. The following is a reference ppp.conf, just a few changes you can use: default:

set log Phase Chat LCP IPCP CCP tun command
nat enable yes
nat same_ports yes
nat use_sockets yes
set redial 15 28800
set reconnect 15 28800
pppoe:
set device PPPoE:fxp0:
set mru 1492
set mtu 1492
set Speed ​​sync
enable lqr
set lqrperiod 5
set cd 5
set dial
set login
set timeout 0
set authname Your UserName used to login
set authkey Your password used to login
set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
add default HISADDR# Add a (sticky) default route
enable dns

You need to change fxp0 in "set device PPPoE:fxp0:" to the name of the NIC interface device dialed by your PPPoE. There is also the change of "your xxx" in "set authname Your UserName used to login" and "set authkey Your Password used to login" to become your username and password. If you do not know your network card device name, which it can be obtained by ifconfig command, the results of my computer as follows:

% ifconfig -a
fxp0: flags = 8843 & lt; UP, BROADCAST, RUNNING, SIMPLEX,MULTICAST> mtu 1500
inet 192.168.10.50 netmask 0xffffff00 broadcast 192.168.10.255
ether 00:d0:59:0d:08:03
media: Ethernet autoselect (10baseT/UTP)
status : active
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
inet 127.0.0.1 netmask 0xff000000

Copyright © Windows knowledge All Rights Reserved