东南大学 - SeUDigger

需要面对面帮助?请寻求当地校园社团支持!
yandy_apple
帖子: 11
注册时间: 2007-11-19 20:28
送出感谢: 0
接收感谢: 0

#61

帖子 yandy_apple » 2008-04-11 10:18

我用KUbuntu,带不带?
天若有情天亦老,人间正道是沧桑
头像
pt0079
帖子: 82
注册时间: 2007-02-07 17:53
来自: SEU_Radio
送出感谢: 0
接收感谢: 0
联系:

#62

帖子 pt0079 » 2008-04-11 10:57

yandy_apple 写了:我用KUbuntu,带不带?
带,反正也都是ubuntu,其实就算用的fedora什么的也一样带吧
yandy_apple
帖子: 11
注册时间: 2007-11-19 20:28
送出感谢: 0
接收感谢: 0

#63

帖子 yandy_apple » 2008-04-11 18:30

pt0079 写了:
yandy_apple 写了:我用KUbuntu,带不带?
带,反正也都是ubuntu,其实就算用的fedora什么的也一样带吧
呵呵,那更好了,我实验室的电脑上是CentOS,笔记本上是KUbuntu:)
天若有情天亦老,人间正道是沧桑
头像
seuxujian
帖子: 2
注册时间: 2008-04-08 15:45
送出感谢: 0
接收感谢: 0

#64

帖子 seuxujian » 2008-04-13 8:57

我的:[email protected]
ppppppppppp+
头像
pt0079
帖子: 82
注册时间: 2007-02-07 17:53
来自: SEU_Radio
送出感谢: 0
接收感谢: 0
联系:

#65

帖子 pt0079 » 2008-04-18 13:24

好像这个帖子的寿命差不多了
头像
seuxujian
帖子: 2
注册时间: 2008-04-08 15:45
送出感谢: 0
接收感谢: 0

#66

帖子 seuxujian » 2008-04-18 13:47

??
这几天感冒了!!!
晕啊!!
头像
asanyang
帖子: 7
注册时间: 2007-04-21 20:40
来自: SEU
送出感谢: 0
接收感谢: 0

#67

帖子 asanyang » 2008-04-26 22:04

嗯呐,现在开始正式上班了,穿梭上虎踞龙盘似乎慢了点,而且工作太忙,都跟不上大家的步伐了,唉!
此人菜鸟
Francio
帖子: 29
注册时间: 2008-03-27 20:09
来自: SEU
送出感谢: 0
接收感谢: 0
联系:

#68

帖子 Francio » 2008-05-08 18:18

最近学校BBS比较忙。。。大活动^_^

很少来这里了:P

等闲了到这里发几篇文章 :P
icSarge
帖子: 135
注册时间: 2007-07-08 19:36
系统: Chakra
送出感谢: 0
接收感谢: 0

#69

帖子 icSarge » 2008-05-16 20:26

貌似都是BBS上的老面孔嘛……
头像
asanyang
帖子: 7
注册时间: 2007-04-21 20:40
来自: SEU
送出感谢: 0
接收感谢: 0

#70

帖子 asanyang » 2008-05-22 22:59

hello,everyone!
best wishes to the ubuntu!
best wishes to seudigger!
best wishes to everyone!
best wishes to myself--------to be a fool man!
此人菜鸟
yuancongwei
帖子: 282
注册时间: 2007-11-18 15:52
来自: 江苏盛泽医院普外科
送出感谢: 0
接收感谢: 0

#71

帖子 yuancongwei » 2008-06-24 19:43

我是新人吧
yuancongwei@gmail.com

临床七年制研一
中大普外科 呵呵
ubuntu用了才一个多月
头像
pt0079
帖子: 82
注册时间: 2007-02-07 17:53
来自: SEU_Radio
送出感谢: 0
接收感谢: 0
联系:

#72

帖子 pt0079 » 2008-08-04 16:55

yuancongwei 写了:我是新人吧
yuancongwei@gmail.com

临床七年制研一
中大普外科 呵呵
ubuntu用了才一个多月
yuancongwei
帖子: 282
注册时间: 2007-11-18 15:52
来自: 江苏盛泽医院普外科
送出感谢: 0
接收感谢: 0

#73

帖子 yuancongwei » 2008-09-08 13:10

挖坟
qbp
帖子: 9
注册时间: 2008-04-21 16:30
来自: nj
送出感谢: 0
接收感谢: 0
联系:

#74

帖子 qbp » 2008-09-09 10:03

看到了好多熟悉的面孔


[email protected]
yuancongwei
帖子: 282
注册时间: 2007-11-18 15:52
来自: 江苏盛泽医院普外科
送出感谢: 0
接收感谢: 0

#75

帖子 yuancongwei » 2008-09-09 13:04

我的BRAS连不上
怎么弄?
我添加好了路由的

用的虎踞龙蟠的代码

#!/bin/sh
#########################################################################
# bras: a bras controller used in Southeast University campus #
# #
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# Copyright (C) 2007 by MinHongbo <[email protected]> #
#########################################################################

#set default user information and profiles
USER=
PASSWORD=
L2TPD=/etc/l2tpd
L2TPDCONF=/etc/l2tpd/l2tpd.conf
PPPOPTIONS=/etc/ppp/options.l2tpd
CHAPSECRET=/etc/ppp/chap-secrets
IFCONFIG_ETH0=/etc/sysconfig/network-scripts/ifcfg-eth0
SLEEP=7

#get default GATEWAY
#Note: This may be some problem in other Unix environments such as
#FreeBSD and Solaris for their networkconfig files does not located
#in /etc/sysconfig/network-scripts/*.
#GATEWAY=`awk -F= '{if($0~/GATEWAY/) print $2}' $IFCONFIG_ETH0`

#function: modify_file
#Usage: modify_file FILENAME pattern-to-find replacement-pattern
#Note: replace pattern-to-find in FILENAME with replacement-pattern
modify_file()
{
_FILE=$1
_STRING=$2
_REP=$3
if [ -e $_FILE ];then
sed "s/$_STRING/$_REP/g" $_FILE > $_FILE~
mv $_FILE~ $_FILE
rm -f $_FILE~
else
echo "$_FILE does not exist! Please check it";
fi
}
#login function for bras
logbras()
{
#get user information
DATE=`date +%F`
echo "--------------------------------------------------"
echo " Welcome to SEU Bras $DATE"
echo "--------------------------------------------------"
echo -n "Username: "
read USER
SAVEDSTTY=`stty -g`
stty -echo
echo -n "Password: "
read PASSWORD
stty $SAVEDSTTY
echo ""
echo "--------------------------------------------------"
}
#function: chconfig
#modify three configuration profiles usd in l2tpd with user name and its password
chconfig()
{
#(1)/etc/l2tpd/l2tpd.conf : name = $USER in the "lac seubras" label
if [ -e $L2TPDCONF ]; then
_PATTERN=`sed -n '/lac/, /name = */'p $L2TPDCONF | sed -n '/name = */'p`
_REPLACE="name = $USER"
modify_file "$L2TPDCONF" "$_PATTERN" "$_REPLACE"
else
echo "$L2TPDCONF does not exist!"
fi

#(2)/etc/ppp/options.l2tpd: name = $USER
#first, get ppp's options file
PPPOPTIONS=`sed -n '/lac/, /pppoptfile = */'p $L2TPDCONF | sed -n '/pppoptfile = */'p`
PPPOPTIONS=`echo $PPPOPTIONS | sed -n 's/pppoptfile = //g'p`
if [ -e $PPPOPTIONS ]; then
_PATTERN=`sed -n '/name/'p $PPPOPTIONS`
_REPLACE="name $USER"
modify_file "$PPPOPTIONS" "$_PATTERN" "$_REPLACE"
else
echo "$PPPOPTIONS does not exist!"
fi
#(3)/etc/ppp/chap-secrets: * $USER * "$PASSWORD" *
if [ -e $CHAPSECRET ]; then
sed "/^[a-zA-Z0-9]/d" $CHAPSECRET >$CHAPSECRET~
sed "/# client/ a $USER * \"$PASSWORD\"" $CHAPSECRET~ >$CHAPSECRET
rm -f $CHAPSECRET~
else
echo "$CHAPSECRET does not exit!"
fi
}

#add intra-campus routes
addroute()
{
echo -n "Adding intra-campus route..."
{
route add -net 172.16.0.0 netmask 255.240.0.0 gw $GATEWAY
route add -net 202.119.0.0 netmask 255.255.224.0 gw $GATEWAY
route add -net 202.119.144.0 netmask 255.255.240.0 gw $GATEWAY
route add -net 211.65.32.0 netmask 255.255.224.0 gw $GATEWAY
route add -net 202.119.24.55 netmask 255.255.255.255 gw $GATEWAY #bras.seu.edu.cn
route add -net 58.192.112.0 netmask 255.255.240.0 gw $GATEWAY #www.seu.edu.cn
route add -net 121.220.0.0 netmask 255.255.0.0 gw $GATEWAY
route add -net 121.248.53.1 netmask 255.255.255.0 gw $GATEWAY
route del default gw $GATEWAY
route add default
} >/dev/null 2>&1
echo " [ OK ]"
}
#del intra-campus routes
delroute()
{
echo -n "Deleting intra-campus routes..."
{
route del -net 172.16.0.0 netmask 255.240.0.0 gw $GATEWAY
route del -net 202.119.0.0 netmask 255.255.224.0 gw $GATEWAY
route del -net 202.119.144.0 netmask 255.255.240.0 gw $GATEWAY
route del -net 211.65.32.0 netmask 255.255.224.0 gw $GATEWAY
route del -net 202.119.24.55 netmask 255.255.255.255 gw $GATEWAY
route del -net 58.192.112.0 netmask 255.255.240.0 gw $GATEWAY
route del -net 121.229.0.0 netmask 255.255.0.0 gw $GATEWAY
route del -net 121.248.53.1 netmask 255.255.255.0 gw $GATEWAY
route del default
route add default gw $GATEWAY
} >/dev/null 2>&1
echo " [ OK ]"
}
#check whether l2tpd is running? if not, launch it.
launch_l2tpd()
{
DATE=`date +%F`
L2TPD=`pstree -p | grep l2tpd | grep -v grep`
if [ -z $L2TPD ]
then
rm -f /var/log/*@l2tpd.log
echo -n "Starting l2tpd..."
l2tpd -D 2> /var/log/"$DATE"@l2tpd.log &
if [ $? = 0 ]
then
sleep 1
echo " [ OK ]"
echo "The logging file is /var/log/$[email protected]."
else
echo " [FAILED]"
exit 1
fi
fi
}
#start seubras services
bras_start()
{
STATUS=`ifconfig -a | grep ppp0`
if [ "$STATUS" ]
then
echo "bras has already been actived!"
exit 0
fi
#First, run l2tpd
launch_l2tpd
#Second, add intra-campus routes
#get username in /etc/ppp/options.l2tpd
CURNAME=`awk '{if($1~/name/) print $2}' $PPPOPTIONS`
echo "$CURNAME login......"
sleep 0.5
addroute
sleep 0.5
#Third, connect bras.seu.edu.cn
echo -n "Connecting to SEU Bras server"
echo 'c seubras' > /var/run/l2tp-control
COUNT=0
until [ "$COUNT" -gt "$SLEEP" ]
do
echo -n ".."
sleep 1
COUNT=`expr $COUNT + 1`
done
STATUS=`ifconfig -a | grep ppp0`
#try 10 times
if [ "$STATUS" ]
then
echo " [ OK ]"
else
echo " [ FAILED ]"
fi
}
#stop seubras services
bras_stop()
{
CURNAME=`awk '{if($1~/name/) print $2}' $PPPOPTIONS`
echo "$CURNAME logout....."
sleep 1
delroute
sleep 1
STATUS=`ifconfig -a | grep ppp0`
if [ -z "$STATUS" ]
then
echo "bras has not been actived!"
exit 0
fi

echo -n "Disconnect from SEU bras server..."
echo 'd seubras' > /var/run/l2tp-control
if [ $? = 0 ]
then
echo " [ OK ]"
else
echo " [ FAILED ]"
fi
}

#switch actions according to $1 argument
case $1 in
route)
addroute
;;
#login seubras using latest loginfo. Alternatively, you can specify user and password by
#modify profiles(l2tpd.conf, options.l2tpd and chap-secrets) manually.
start)
bras_start
;;
#close bras connection
stop)
bras_stop
;;
#restart bras connection
restart)
bras_stop
sleep 1
bras_start
;;
#build a new bras connection with another user.
#It provides a convenient mean of switching different users,
#such as [email protected] and [email protected]
login)
logbras
#check if bras has been already launched by look up a ppp0 interface.
#if true, try to stop it.
PPP0=`ifconfig -a | grep ppp0`
if [ ! -z "$PPP0" ]
then
bras_stop
fi
sleep 1
chconfig
bras_start
;;
install)
echo "Copy configuration files..."
if [ ! -d "$L2TPD" ]
then
echo "$L2TPD does not exist."
echo -n "Creating a new directory $l2tpd ..."
mkdir $l2tpd
echo " [ OK ]"
fi
echo "copy l2tpd.conf to $L2TPDCONF" && \
cp configs/l2tpd.conf $L2TPDCONF && \
echo "copy options.l2tpd to $PPPOPTIONS" && \
cp configs/options.l2tpd $PPPOPTIONS && \
echo "copy chap-secrets to $CHAPSECRET" && \
cp configs/chap-secrets $CHAPSECRET && \
echo "OK! You can connect to bras server, try to command: bras login"
;;
help)
sed -n '1,$'p bras-help
;;
*)
echo "Usage: `basename $0 ` [ login | start | stop | restart | route | install ] "
;;
esac


红字是我自己改的部分


结果如图
您没有权限查看这个主题的附件。
回复

回到 “校园社团支持”