Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >System Management


    

Blue Forest http://www.lslnet.com at 20:18 on April 6, 2006


FreeBSD 4.8 PPPoE server set up examples [notebook]

As the Forum box to eat, prepared a document here : TXT

Http://www.hackerbay.com/doc/pppoe_server.txt

PS : Many of the documents in this regard, but I think the most simple notebook, hoho~~

PS : It seems that the kernel again because some inconsistencies, the same method can not be used in FreeBSD 5.1, it would be stable may migrate as well.

[code]FreeBSD 4.8 PPPoE server set up examples [notebook]

Hygrobatoidea, Aturidae Aborigen Yin
2003.07.10

# Test firewall dial ADSL, PPPoE server creates a simple, if you put further allocation of RADIUS
Some ISP's server credited with # : P ratio?

# Beginner who can ctrl+c ctrl + v and try to experience the cool feeling you bring FreeBSD, Linux is definitely not comparable;
# If you are a veteran, I hope to explore this topic on the PPPoE.

# Strongly recommend that you take a look at these FreeBSD acquiescence of the document;
1s /usr/share/examples/ppp
# Document also refers to the use of RADIUS for user verification.
#PS : We often less than FreeBSD search of files, the files carrying FreeBSD is very rich;
# Reading these examples, you see : man pppoed basically can get;
# Certainly, we hope that through your E-wen, GOD bless us : D

# Acquiescence to install the system cvsup to 4.8 stable;

#vi /etc/ppp/ppp.conf
Default :
Set log Phase Chat LCP IPCP CCP tun command
Ident user-ppp VERSION (built COMPILATIONDATE)
Set device /dev/cuaa1
Set speed 115200
Set dial "ABORT ABORT BUSY Signal NO\\sCARRIER TIMEOUT 5 \
\ "\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT "
Set timeout 180 # 3 minute idle timer (the default)
[# Dns enable DNS request (for resolv.conf)
Papchap :
Set phone PHONE_NUM
Set authname USERNAME
Set authkey PASSWORD
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

# This is our use;
Pppoe-in :
# Only allow direct mode for use on server-side
Enable lqr # Enable proxy LQR and proxy-arp
Enable client authentication chap stomach passwdauth # Force
#set Ifaddr 10.0.0.1 10.0.0.100-10.0.0.199 # Hand out up to 100 IP numbers
# Designated address of
Set ifaddr 172.16.180.254 172.16.180.100-172.16.180.200 # Hand out up to 100 IP numbers
# Allow DNS negotiation accept dns
#end

# Ip address pool to explain
Set ifaddr 172.16.180.254 172.16.180.100-172.16.180.200 # Hand out up to 100 IP numbers
172.16.180.254 # dial access to the server ip ppp after only one;
172.16.180.100-172.16.180.200 # address pool
###

#vi /etc/ppp/ppp.secret
##################################################
# Here you can develop a client ip address from the pool or distribution; Ip address designated Ikenouchi not recommended.
# Authname Authkey Peer 's IP address Label Callback
Tutux gogogo
Fixip fixipaddress 172.16.190.100
Pub godgodgod
Pub1 godgodgod
Pub2 godgodgod
Pub3 godgodgod
Pub4 godgodgod
Pub5 godgodgod
Pub6 godgodgod
#end

#vi /etc/rc.conf
# NIC accompanied up the parameters for the use of PPPoE
Ifconfig_fxp1= "inet up"

###end


# Management of a simple script

#vi /usr/local/sbin/pppoe-server-mgr.sh

#!/bin/sh
#pppoe-server-mgr.sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin

PEDEV= "fxp1"
PECONF= "pppoe-in"
PEPID= "/var/pppoed.pid"
PPPOED= "/usr/libexec/pppoed"

Copyright () (
Echo. " "
Echo "Welcome, my baby, GOD bless you. "
Echo "PPPoE Server on `uname -s` `uname -r`. , Aborigen Yin (postmaster@hackerbay.com) copyleft 2003. "
Echo. " "
}
#end

Usage () (
Echo. " "
Echo "Usage:$0" start | stop | restart "; "
Sleep 1
Return 1
}

Proc_actived () (
PROCPIDFILE=$1
If [z "$PROCPIDFILE"]
Then
Echo "Error:require pid file. "
#Yes, Exit is no return.
Exit 1
Fi
If [-r "$PROCPIDFILE"]
Then
PREPID=`cat $PROCPIDFILE 2>;/dev/null`
If [! Z "$PREPID"]
Then
MKRUN=`ps -ax | awk '(print $ 1)' | grep "$PREPID" `grep | grep-c-V
If [0] $MKRUN -ne
Then
Return 1
Fi
Fi
Fi
Rm-f "$PROCPIDFILE" ";/dev/null 2>;&1
}
#end

Panorama : P #say
Copyright

$ 1 in case
Start)
Proc_actived $PEPID
If [0] $? -ne
Then
Echo "Error:PPPoE server running. "
Exit 1
Fi
$PPPOED L $PECONF P $PEPID $PEDEV
If [0] $? -ne
Then
Echo "Error:PPPoE server start fail. "
Exit 1
Else
Echo "PPPoE server started. "
Exit 0
Fi
;;
Stop)
Proc_actived $PEPID
If [0] $? -eq
Then
Echo "dumping Warnning:PPPoE server running. "
Exit 0
Fi
Kill `cat $PEPID 2>; /dev/null` "; /dev/null 2>;&1
If [0] $? -ne
Then
Echo "Error:PPPoE server stop fail. "
Exit 1
Else
Echo "NOTE:All connectted client will lost. "
Ppp for PECPID in `ps -ax | grep | grep direct | grep "$PECONF" | awk '(print $ 1)' `
Do
Kill $PECPID "; /dev/null 2>;&1
Done
Echo "PPPoE server stopped. "
Exit 0
Fi
;;
Restart)
Echo "Try to restart PPPoE server. "
Stop, named $ 0 $ 0 start
;;
*)
Usage
Exit 1
;;
Esac

#end

# Pppoed launch parameters of the explanation from the man pppoed :
/usr/libexec/pppoed L pppoe-in P /var/pppoed.pid fxp1
L pppoe-in # specified here in /etc/ppp.conf Lane credited for doing PPPoE configuration items.
P /var/pppoed.pid #pppoed PID process of storing documents;
Fxp1 # PPPoE service for the NIC
#

Chmod 755 /usr/local/sbin/pppoe-server-mgr.sh

# Switched automatically activated
Ln-s /usr/local/sbin/pppoe-server-mgr.sh /usr/local/etc/rc.d

#Good, All ok, that simple enough : P
[/code]

FreeBSD 4.8 PPPoE server set up examples [notebook]

This can refer to

Http://chinaunix.net/forum/viewtopic.php?t. . . Highlight=pppoe

FreeBSD 4.8 PPPoE server set up examples [notebook]

I remember kernel reconfiguration down to 4.7, not 4.8? Is not supported by acquiescence?

FreeBSD 4.8 PPPoE server set up examples [notebook]

Hygrobatoidea, Aturidae the formidable! ! !

FreeBSD 4.8 PPPoE server set up examples [notebook]

[quote][i] Note from the original "ihweb"] Hygrobatoidea, Aturidae the formidable! ! ! [/quote [/i] Released :
     
"Hygrobatoidea, Aturidae the formidable oh"
Or "ah, oh pushed the formidable"

FreeBSD 4.8 PPPoE server set up examples [notebook]

[quote][i] Note from the original "liangfuhong" I remember] 4.7 kernel got to re-allocation, not 4.8? Is not supported by acquiescence? [/quote [/i] Released :
     

Acquiescence circumstances, the kernel PPPoE support for editing acquiescence Loadable Kernel Module, the system automatically activated when loading pppoed.

This is the [size=18][color=red] 4.8 [/color][/size] example, I do not intend to not test all systems again, if you take into account that there are problems in other versions, it may be made here to discuss.

FreeBSD 4.8 PPPoE server set up examples [notebook]

[quote][i] Note from the original "bb8848" [/i] released :
   
"Hygrobatoidea, Aturidae the formidable oh"
Or "ah, oh pushed the formidable" [/quote]

Do things conducive to your own good?

The forum is not enough even for a fast machine, you silly if this irrigation water bandwidth saved, thank you, the General Assembly Fan old.



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com