å°æ¬ãããŠããNesmitã®ãªã¯ãšã¹ãã«å¿ããŠãç§ã¯èªåã®ä»£ããã«HOW-TOãå
¬éããŠããŸãã 圌ã®æå°ã¯ããã®æçš¿ã«èŒã£ãŠããç§ã®ãã®ããã泚ç®ã«å€ãããšæããŸããç§ã®ãã®ã§ã¯ãå€ãã®æ¬ ç¹ã誀ãããããŸããã ãããŠç¡é§ã«åœŒã®èšäºã¯ããŒãã«å
¥ããããŸããã§ããã éåžžã«è¯ãèšäºã ããã«åœŒå¥³ã¯
Ubuntu 9.10ã10.04ã«ã¢ããã°ã¬ãŒãããã«ã¯ãäœã觊ããã«ã
pptpd 1.3.4-2
freeradius2.1.0
abills 0.5
dictionary.microsoft
è«æ±éçºè
ã¯ãã¡ãïŒ
abills.net.uaãã®è«æ±æžã®éçºè
ã«æè¬ããŸãïŒ
ç®çïŒ
1.ã€ã³ã¿ãŒãããã«ããŒã«ã«ãšãªã¢ãããã¯ãŒã¯ãæäŸããŸãã
2.ãã©ãã£ãã¯ã¢ã«ãŠã³ãã£ã³ã°
3.財åäŒèš
4.æéãã©ã³ã®äœæã
5.å¶éé床
6. 128ãããæå·åã«ã¯ãå€ãã®çç±ããããŸãã
7.æå·åãªããmschapv2ã䜿çšã
8.å人ã¢ã«ãŠã³ãã®æå·åïŒApache SSLïŒ
9.è¿ä»£åã®å¯èœæ§ïŒã¡ãŒã«ãµãŒããŒãšèª²éãªã©ã®çµ±åã å€ãã®ã¢ãžã¥ãŒã«ãæ¯æãããŠãããããã§ã¯ãããŸããã
åç
§ïŒ
abillsã®ã€ã³ã¹ããŒã«ã«é¢ãã2ã€ã®æçšãªèšäºãèŠã€ããŸããã
habrahabr.ru/blogs/linux/23650-財å£
silverghost.org.ua/2008/10/13/ustanovka-billinga-abills-na-ubuntu-804-lts-server-mikrotik-router-os-v-kachestve-servera-dostupa-財å£çªå·2
ãã®ä»ïŒ
www.opennet.ru/base/net/abills_server.txt.htmlãåæ§ã«æçšã§ãããmicrotikã¯ãããŸããã
www.xakep.ru/magazine/xa/112/136/1.asp-pppoepptpdã®ãã©ã¡ãŒã¿ãŒã®èª¬æ
www.compress.ru/article.aspx?id=18183&iid=842ååãšããŠããã®ã»ããã¢ããã¯ãPPPoEãŸãã¯microtikãNASãšããŠäœ¿çšããå Žåãšå€ãããŸããã é çã®ãªãã¯ã©ã€ã¢ã³ãã100人以äžããå ŽåãåŸè
ã®æ¹ãåçæ§ãé«ããªããŸãã
æåã®2ã€ã®èšäºããæ
å ±ãååŸããŸãããããã¯ç§ãã¡ã®ãããã¯ã«æãè¿ããã®ã§ãã ä¿®æ£ããã第1ã®èšäºã«ã¯ã第2ã®+ãããããããã®è©³çŽ°ãè¿œå ãããŸãã
泚æïŒ ã·ã¹ãã ã®ã€ã³ã¹ããŒã«ãéå§ããåã«ã 䜿çšããŠãããããã¯ãŒã¯ã«ãŒãã決å®ããŸãã IntelãŸãã¯3comã«ãŒãã®äœ¿çšããå§ãããŸãã realteksã®PPTPã¯ãæ確ãªçç±ããªããã³ãã«ãã°ãªããããŠç ŽæããŸãã
1.ã·ã¹ãã ãã€ã³ã¹ããŒã«ããŸãã
ç§ãéžãã ã®ã¯Ubuntu 9.10ãã£ã¹ããªãã¥ãŒã·ã§ã³ã§ãããããã¯ãã§ã«ãäžé£ã®ããã±ãŒãžãäœæãããå®çžŸã®ããã·ã¹ãã ã§ãã æ®ã1.5ãæã®10.04ãžã®ã¢ããã°ã¬ãŒãã¯åé¡ã«ãªããŸããã è¯ã管çè
-æ ãè
ã®ç®¡çè
ã ãªãé çãå¿
èŠãªã®ã§ããïŒ LTS 8.04ã®æåã®ãµãŒããŒã¯ãããŒããã©ã€ããã«ããŒããããŸã§1.5幎éååšããŠããŸããã ãã®éã誰ãè«æ±ã«è§ŠããŸããã§ããã
ã€ã³ã¹ããŒã«åŸãæŽæ°ãããã¹ãŠãæåŸã«é
眮ããŸãã
#apt-get update
#apt-get dist-upgrade
ãããŠåèµ·åããŸãã
ã«ãŒãã®äžã«è¡ããŸãã
$ sudo -s -H
2. 1è¡ã§å¿
èŠãªããã±ãŒãžãã€ã³ã¹ããŒã«ããŸãã
#apt-get install mysql-server mysql-client libmysqlclient15-dev apache2 apache2-doc apache2-mpm-prefork apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt libdbi-perl libdbd-mysql-perl libdigest-md4-perl libdigest-sha1-perl libcrypt-des-perl freeradius radiusclient1 radiusclient1 pptpd
MySQLã®ã€ã³ã¹ããŒã«äžã«ããµãŒããŒã¯mysqlãµãŒããŒã®ã«ãŒããã¹ã¯ãŒãã2åèŠæ±ããŸããããã«å¿
èŠã«ãªããŸãã
Apacheçšã«ã€ã³ã¹ããŒã«ãããã¢ãžã¥ãŒã«ãå®è¡ããŸãã
#a2enmod ssl
#a2enmod rewrite
#a2enmod suexec
#a2enmod include
Apacheãåèµ·åããŸãã
#/etc/init.d/apache2 restart
ïŒa2enmod rewrite-å¿
é ã管çããã«ã«å
¥ããšãšã©ãŒãçºçããŸãã
3. abills.net.uaãµã€ãããabills 0.50ãããŠã³ããŒããã/ usr / abillsã«å±éããããcvsã䜿çšããŠå®å®çãªãªãŒã¹ãããŠã³ããŒãããŸãã
ãã¡ã€ã«ãªã³ã¯ïŒ
sourceforge.net/projects/abills/files4.äžè¶³ããŠãããã£ã¬ã¯ããªãäœæããæš©éãå€æŽããŸãã
# mkdir /usr/abills/backup
# chown -R www-data:www-data /usr/abills/backup
# mkdir /usr/abills/cgi-bin/admin/nets
# chown -R www-data:www-data /usr/abills/cgi-bin/
# mkdir /usr/abills/var
# mkdir /usr/abills/var/log
# chown -R freerad:freerad /usr/abills/var
次ã«ã/ etc / sudoersãç·šéããŠè¡ãè¿œå ããŸãã ãã®ã³ãã³ãã¯ãVPNãã³ãã«ã匷å¶çµäºããŸãã
www-data ALL=NOPASSWD: /usr/abills/misc/pppd_kill
5.éçºè
ã®ãµãŒããŒããã®æ
å ±ãfreeradiusã«èšå®ãããã£ã¹ããªãã¥ãŒã·ã§ã³ãç·šéããŸãã
ã¢ãžã¥ãŒã«ã»ã¯ã·ã§ã³ã®/etc/freeradius/radiusd.confã§ã»ã¯ã·ã§ã³ã説æããŸãã
#abills_preauth
exec abills_preauth {
program = "/usr/abills/libexec/rauth.pl pre_auth"
wait = yes
input_pairs = request
shell_escape = yes
#output = no
output_pairs = config
}
#abills_postauth
exec abills_postauth {
program = "/usr/abills/libexec/rauth.pl post_auth"
wait = yes
input_pairs = request
shell_escape = yes
#output = no
output_pairs = config
}
#abills_auth
exec abills_auth {
program = "/usr/abills/libexec/rauth.pl"
wait = yes
input_pairs = request
shell_escape = yes
output = no
output_pairs = reply
}
#abills_acc
exec abills_acc {
program = "/usr/abills/libexec/racct.pl"
wait = yes
input_pairs = request
shell_escape = yes
output = no
output_pairs = reply
}
execã»ã¯ã·ã§ã³ã®file / etc / freeradius / modules / execã§ã¯ã次ã®ããã«ãªããŸãã
exec {
wait = yes
input_pairs = request
shell_escape = yes
output = none
output_pairs = reply
}
ãã¡ã€ã«/ etc / freeradius / sites-enabled / default-æ¿èªãpreacctãpost-authã»ã¯ã·ã§ã³ãç·šéããŸãã ãããã®ã»ã¯ã·ã§ã³ã§ã¯ãæ®ããã³ã¡ã³ããŸãã¯åé€ããŸãã
authorize {
preprocess
abills_preauth
mschap
files
abills_auth
}
preacct {
preprocess
abills_acc
}
post-auth {
Post-Auth-Type REJECT {
abills_postauth
}
}
/ etc / freeradius / users
DEFAULT Auth-Type = Accept
/etc/freeradius/clients.confãç·šéãããã¹ãŠãã³ã¡ã³ãåããæåŸã«è¿œå ããŸãïŒå¥ã®ã³ãŒãã¯ãŒããå€æŽããæ¹ãè¯ãå Žåã¯ãããŒã«ã«ãã·ã³ã®ã¯ã©ã€ã¢ã³ã/ãµãŒããŒïŒ
client localhost {
ipaddr = 127.0.0.1
secret = radsecret
shortname = shortname
}
ãã¡ã€ã«/ etc / freeradius /èŸæžã®ç·šéã«é²ã¿ãæåŸã«è¿œå ããŸã
# Limit session traffic
ATTRIBUTE Session-Octets-Limit 227 integer
# What to assume as limit - 0 in+out, 1 in, 2 out, 3 max(in,out)
ATTRIBUTE Octets-Direction 228 integer
# Connection Speed Limit
ATTRIBUTE PPPD-Upstream-Speed-Limit 230 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit 231 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-1 232 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-1 233 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-2 234 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-2 235 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-3 236 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-3 237 integer
ATTRIBUTE Acct-Interim-Interval 85 integer
ãã®åŸãååŸãåèµ·åããŸãã
#/etc/init.d/freeradius restart
ãšã©ãŒãæžã蟌ãã å Žåãfreeradius -Xã³ãã³ãã¯ãã°ãçºè¡ãããããæ€çŽ¢ããŸãã
6. radiusclientãæ§æããŸãã
/ etc / radiusclient / serversã®ç·šé
127.0.0.1 radsecret
/ etc / radiusclient /ã«é
眮ãããdictionary.microsoft
ãããã®ãã¡ã€ã«ã¯ãmschap v2ããã³mppeã®ãµããŒããæ
åœããŸãã
mschap2ãªãã§cakebilling.googlecode.com/files/etc.tar.bz2ã§ãã¡ã€ã«ã
ååŸã§ããŸã
ãmppeã¯æ©èœã
ãŸããã
èŸæžãã¡ã€ã«ã«æ¬¡ã®è¡ãè¿œå ããŸãã
INCLUDE /etc/radiusclient/dictionary.microsoft
# Limit session traffic
ATTRIBUTE Session-Octets-Limit 227 integer
# What to assume as limit - 0 in+out, 1 in, 2 out, 3 max(in,out)
ATTRIBUTE Octets-Direction 228 integer
# Connection Speed Limit
ATTRIBUTE PPPD-Upstream-Speed-Limit 230 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit 231 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-1 232 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-1 233 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-2 234 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-2 235 integer
ATTRIBUTE PPPD-Upstream-Speed-Limit-3 236 integer
ATTRIBUTE PPPD-Downstream-Speed-Limit-3 237 integer
ATTRIBUTE Acct-Interim-Interval 85 integer
ãã¡ã€ã«ãç·šéãã/ etc / hosts
127.0.0.1 localhost vpn-server
127.0.1.1 localhost vpn-server
vpn-serverã¯ããªãã®ãµãŒããŒã®ååã§ããããªãã®è£éã§å€æŽããŠãã ããã ããããªããšãradiusã¯ã©ã€ã¢ã³ãã¯radiusãµãŒããŒã«æ¥ç¶ã§ããŸããã
7.次ã«ãAbillSã®ããŒã¿ããŒã¹ãäœæããå¿
èŠããããŸã
#mysql -u root -p
GRANT ALL ON abills.* TO abills@localhost IDENTIFIED BY "yourpassword";
CREATE DATABASE abills;
ãªãã·ã§ã³2ïŒphpmyadminããã±ãŒãžãã€ã³ã¹ããŒã«ãã匷åãªãã¹ã¯ãŒãã®çæãå«ããã¹ãŠã1åã§ç°¡åã«å®è¡ã§ããŸãã
sudo apt-get install phpmyadmin
ããã«
ãµãŒããŒã®IPã¢ãã¬ã¹/ phpmyadminã«ãŒããŠãŒã¶ãŒåãšãã¹ã¯ãŒããå
¥åããŠãµãŒããŒã管çãã
[ç¹æš©]ã¿ã-> [æ°ãããŠãŒã¶ãŒãè¿œå ]
ãŠãŒã¶ãŒåïŒabills
ãã¹ãïŒlocalhost
ãã¹ã¯ãŒãïŒçæãã¿ã³ãæŒãããã¹ã¯ãŒããèšæ¶ãããã¡ã¢ããŸãã
Dawã眮ãïŒååã«ãŠãŒã¶ãŒåã䜿çšããŠããŒã¿ããŒã¹ãäœæããããã«å®å
šãªæš©éãä»äžããŸãã
[OK]ãã¯ãªãã¯ãããšãããŒã¿ããŒã¹ãäœæãããŸãã
ããã§ãabillsãå«ãã«ã¿ãã°ããã®ããŒã¿ããŒã¹ãã³ããããŒã¿ããŒã¹ã«å
¥åããå¿
èŠããããŸã
#mysql -u root -p abills < abills.sql
Abillsæ§æãã¡ã€ã«ã®æ§æ
ãã©ã«ããŒ/ usr / abills / libexecã§å®è¡ããŸã
#cd /usr/abills/libexec
#cp config.pl.default config.pl
ããããç·šéããŸãã
ããŒã¿ããŒã¹ãžã®ã¢ã¯ã»ã¹ã®æ£ãã詳现ã瀺ããããã€ãã®ãã©ã¡ãŒã¿ãŒãå€æŽããŸãã
$conf{dbhost}='localhost';
$conf{dbname}='abills';
$conf{dbuser}='abills';
$conf{dbpasswd}='SxTcBAx7dYfR7cG7';
$conf{dbcharset}='utf-8';
$conf{default_language}='russian';
$conf{periodic_check}='yes';
$conf{ERROR_ALIVE_COUNT} = 10;
$conf{RADIUS2}=1;
äžèŠãªã¢ãžã¥ãŒã«ãç¡å¹ã«ããŸãã
@MODULES = ('Dv',
# 'Voip',
# 'Docs',
# 'Mail',
'Sqlcmd');
8. conf /usr/abills/Abills/defs.confãä¿®æ£ããŸã
以äžã®è¡ã®ã¿ãå€æŽããŸã
$SNMPWALK = '/usr/bin/snmpwalk';
$SNMPSET = '/usr/bin/snmpset';
$GZIP = '/bin/gzip';
$TAR='/bin/tar';
$MYSQLDUMP = '/usr/bin/mysqldump';
$IFCONFIG='/sbin/ifconfig';
ããã¯ã¢ãããæ©èœããããã«ãªããŸãããæåã¯ãæ§æãfreeBSDã§ã·ã£ãŒãã«ãªããŸãã
8. Apacheã®èšŒææžãäœæããŸã
#mkdir /etc/apache2/ssl
次ã®ã³ãã³ãã®è³ªåã«çããŸãã
#make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem
#a2enmod ssl
/ etc / apache2 / sites-available / default-sslã®ããã¹ããæå®ã®ããã¹ãã«çœ®ãæããŸãã
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
DocumentRoot /usr/abills/cgi-bin/
Alias /abills "/usr/abills/cgi-bin/"
<Directory "/usr/abills/cgi-bin">
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]
Options Indexes ExecCGI SymLinksIfOwnerMatch
<_/_IfModule>
AddHandler cgi-script .cgi
Options Indexes ExecCGI FollowSymLinks
AllowOverride none
DirectoryIndex index.cgi
#Options ExecCGI
<Files ~ ".(db|log)$">
Order allow,deny
Deny from all
<_/_Files>
<_/_Directory>
#Admin interface
<Directory "/usr/abills/cgi-bin/admin">
AddHandler cgi-script .cgi
Options Indexes ExecCGI FollowSymLinks
AllowOverride none
DirectoryIndex index.cgi
order deny,allow
allow from all
<_/_Directory>
ErrorLog /var/log/apache2/error-abills.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access-abills.log combined
<_/_virtualhost>
ã³ããŒãããšãã¯ãã¹ã©ãã·ã¥ã®ååŸã«ããèšå·ãåé€ããŠãã ãã!!!ããã§ã³ãŒããã¯ãcp1251ã«å€æŽããŸã/etc/apache2/conf.d/charset
AddDefaultCharset cp1251
ã·ã³ããªãã¯ãªã³ã¯ãäœæããŸãã
#ln -s /etc/apache2/sites-available/default-ssl /etc/apache2/sites-enabled/default-ssl
Apacheãåèµ·åããŸã
#/etc/init.d/apache2 restart
ãµãŒããŒã®åäœã確èªããã¢ãã¬ã¹ã«ã¢ã¯ã»ã¹ããŸãã
ããªãã®server_ip_address / adminãã¹ãŠãæåããå Žåãã¬ããã ããã§ãªãå Žåã¯ããã°ãèªãã§ãã ããã ãã¹ãŠã®åã¯åœŒãã®äžã«ãããŸãïŒ
9. pptpdã®æ§æïŒ
/etc/pptpd.confã®ç·šé
ppp /usr/sbin/pppd
option /etc/ppp/pptpd-options
connections 500
localip 192.168.160.1
/ etc / ppp / optionsãç·šéããŠãè¡ãè¿œå ããŸã
+mschap-v2
/ etc / ppp / pptpd-optionsãç·šéãã次ã®è¡ãè¿œå ããŸãã
ms-dns 192.168.160.1 #
asyncmap 0
lcp-echo-failure 30
lcp-echo-interval 5
ipcp-accept-local
ipcp-accept-remote
plugin radius.so
plugin radattr.so
ããã©ã«ãã§ã¯ãconfã¯mschap-vââ2 + mppeã§æ§æãããŸãã
ã·ã§ã€ããŒã¹ã¯ãªãããäœæããèµ·åæš©éãä»äžããŸãã
#touch /etc/ppp/ip-up.d/shaper
#chmod 744 /etc/ppp/ip-up.d/shaper
#nano /etc/ppp/ip-up.d/shaper
#!/bin/sh
if [ -f /var/run/radattr.$1 ]
then
DOWNSPEED=`/usr/bin/awk '/PPPD-Downstream-Speed-Limit/ {print $2}' /var/run/radattr.$1`
UPSPEED=`/usr/bin/awk '/PPPD-Upstream-Speed-Limit/ {print $2}' /var/run/radattr.$1`
# echo $DOWNSPEED
# echo $UPSPEED >
/sbin/tc qdisc del dev $1 root > /dev/null
/sbin/tc qdisc del dev $1 ingress > /dev/null
##### speed server->client
if [ "$UPSPEED" != "0" ] ;
then
# /sbin/tc qdisc add dev $1 root handle 1: htb default 20 r2q 1
/sbin/tc qdisc add dev $1 root handle 1: htb default 20
/sbin/tc class add dev $1 parent 1: classid 1:1 htb rate ${UPSPEED}kbit burst 4k
/sbin/tc class add dev $1 parent 1:1 classid 1:10 htb rate ${UPSPEED}kbit burst 4k prio 1
/sbin/tc class add dev $1 parent 1:1 classid 1:20 htb rate ${UPSPEED}kbit burst 4k prio 2
/sbin/tc qdisc add dev $1 parent 1:10 handle 10: sfq perturb 10 quantum 1500
/sbin/tc qdisc add dev $1 parent 1:20 handle 20: sfq perturb 10 quantum 1500
/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10
/sbin/tc filter add dev $1 parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10
/sbin/tc filter add dev $1 parent 1: protocol ip prio 10 u32 match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u160x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:10
fi
##### speed client->server
if [ "$DOWNSPEED" != "0" ] ;
then
/sbin/tc qdisc add dev $1 handle ffff: ingress
/sbin/tc filter add dev $1 parent ffff: protocol ip prio 50 u32 match ip src 0.0.0.0/0 police rate ${DOWNSPEED}kbit burst 12k drop flowid :1
fi
fi
æ圢ããå¥ã®æ¹æ³ããããŸãã IPNã¢ãžã¥ãŒã«çµç±ã ãã®æ¹æ³ã«ã€ããŠã¯ãéçºè
ã®ãã©ãŒã©ã ã§èªãããšãã§ããŸãã
10.å¿
èŠã«å¿ããŠãsquidãã€ã³ã¹ããŒã«ããéæã«ããŸãã
#apt-get install squid
/etc/squid/squid.confãã¡ã€ã«ã®è¡ãå€æŽããŸã
http_port 3128
ã«
http_port 3128 transparent
ããã©ã«ãã§ã¯ãèãããããã¹ãŠã®ãããã¯ãŒã¯ãæ§æã«ç»é²ãããŠãããããã³ã¡ã³ããåé€ããŸãã
http_access allow localnet
ãµãŒãã¹ãåéãã
# /etc/init.d/squid restart
11. natããªã³ã«ããŠã次ã®è¡ãrc.localãã¡ã€ã«ã«æžã蟌ã¿ãŸã
ãã¡ã€ã¢ãŠã©ãŒã«ã«ãŒã«ïŒ
IPã¢ãã¬ã¹192.168.1.10ãadslã«ãŒã¿ãŒã«åãã£ãŠããŸãã
# .
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X
iptables -t nat -X
iptables -t mangle -X
# NAT
iptables -t nat -A POSTROUTING -s 192.168.160.0/255.255.255.0 -j SNAT --to-source 192.168.1.10
# , .
iptables -t nat -A PREROUTING -p tcp -s 192.168.160.0/24 --dport 80 -j REDIRECT --to-port 3128
#
iptables -A INPUT -p TCP -i eth0 --dport 3128 -j DROP # proxy
iptables -A INPUT -p TCP -i eth1 --dport 3128 -j DROP
iptables -A INPUT -p TCP -i eth0 --dport 3306 -j DROP #mysql
iptables -A INPUT -p TCP -i eth1 --dport 3306 -j DROP
#
echo "1" > /proc/sys/net/ipv4/ip_forward
exit 0
ã¹ã¯ãªããã¯åå§çã§ãããéå§ããã«ã¯ååã§ãã
12. / etc / crontabã«æ¬¡ãå
¥åããŸãã
*/5 * * * * root /usr/abills/libexec/billd -all
1 0 * * * root /usr/abills/libexec/periodic daily
1 0 1 * * root /usr/abills/libexec/periodic monthly
#backup
1 3 * * * root /usr/abills/libexec/periodic backup
13.ã¢ãã«ã®èšå®
ip-address-your-server / adminã§ç®¡çWebã€ã³ã¿ãŒãã§ãŒã¹ãéã
ãŸããŠãŒã¶ãŒå/ãã¹ã¯ãŒãabills / abillsã¯åŸã§å€æŽã§ããŸãã
ããã©ã«ãã§ã NASããŠãŒã¶ãŒãããã³é¢çšã¯ãã§ã«äœæãããŠããŸãã ç¶æ³ã«å¿ããŠå€æŽããŸãã
ã·ã¹ãã ã«ç§»å->ãµãŒããŒã«ã¢ã¯ã»ã¹
IPæžã蟌ã¿127.0.0.1
pppdã¿ã€ããéžæããŸãïŒpppd + Radius
çããŠããïŒç§ïŒïŒ120
RADIUSãã©ã¡ãŒã¿ãŒïŒãïŒïŒAcct-Interim-Interval = 60
IPããŒã«ãè¿œå ããŸãã
192.168.160.2-192.168.160.254ã眮ããŸã
æéã°ã«ãŒããèšå®ããŸãã
/ã·ã¹ãã /ã€ã³ã¿ãŒããã/æéãã©ã³/ã°ã«ãŒã/
è¿œå ïŒç¡å¶éãGIDïŒ0
/ã·ã¹ãã /ã€ã³ã¿ãŒããã/æéãã©ã³/
ïŒïŒ1
ã¿ã€ãã«ïŒãç¡å¶éã
ã°ã«ãŒãïŒã1ïŒç¡å¶éã
æ¯æ¥a / pïŒ10
å ãã
é床ã決å®ããŸãã
/ã·ã¹ãã /ã€ã³ã¿ãŒããã/æéãã©ã³/
ã¯ãªãã¯ããŠãéžæããã¬ãŒããééã
è¿œå ãã¿ã³ãã¯ãªãã¯ããŠããããã©ãã£ãã¯
é床ãå
¥åããŠè¿œå ããŸãã
ãŠãŒã¶ãŒãååŸããŸãïŒ
/ã¯ã©ã€ã¢ã³ã/ãã°ã€ã³/ã€ã³ã¿ãŒããã/ãŠãŒã¶ãŒã®è¿œå /
ã¯ã©ã€ã¢ã³ããäœæããŸãïŒãã¹ã¯ãŒãããã°ã€ã³ãååãã¯ã¬ãžããã ãããŠãããã«å£åº§ã«ãéãå
¥ããããšãã§ããŸãã
ããã§ã®äž»ãªããšã¯ãæåã«é¢çšã°ã«ãŒããäœæãã次ã«é¢çšèªäœãäœæããããšã§ãã ããã«ãWiKiã§ãã¹ãŠã®ãªãã·ã§ã³ã«ã€ããŠè©³ããèªãã§ãã ããã éåžžã圌ãã¯ãªãã·ã§ã³ã®æå³ãç解ããåã«å«ã³å§ããŸãã
ãã®æ瀺ã«åŸã£ãŠãç§ã¯4å°ã®ãµãŒããŒãäžããŠãæ£åžžã«åäœããŠããŸãããã§ã«é¢é£æ§ã¯ãããŸããããã¢ãã©ã¹ã¯ãã®å®å®æ§ãšæè»æ§ã«æºè¶³ããŠããŸããæ®ãã¯ããªãã®æã«ãããŸãã
æå·åãåé€ããå¿
èŠãããå Žåã¯ã次ãå®è¡ããŸãã
ãã¡ã€ã«/ etc / ppp / pptpd-optionsã®è¡ãrequire-mppe-128ããåé€ããŸããããã«ãããVPNãã³ãã«ã®å®å®æ§ãåäžããCPUã解æŸãããŸãã
çµæã®ã¹ã¯ãªãŒã³ã·ã§ããïŒ
Forum.ubuntu.ru =ïŒã§Nesmit'yã«å¯ŸåŠããŠãããŠããããšããç§ã¯ãããšã¯äœã®é¢ä¿ããããŸããã 圌ã¯ãã®èšäºãæžããŸããã 圌ã®ããã«é åºã«ãã®èšäºãå
¬éããããšãèš±å¯ããŸããã§ããïŒïŒïŒ
é 匵ã£ãŠ æ
éãå«ããã¹ãŠã®è³ªåãèãæºåãã§ããŠããŸãã