Escolar Documentos
Profissional Documentos
Cultura Documentos
ClearOS
ClearOS
PPPoE
WRT54GL Server
LightSquid Log File
Upgrade rewjang
uamallow
website.txt
Log File ?
Server ()
DynDNS ClearOS (Register ClearOS)
ip 10.0.1.2 - 10.0.1.10
24
IP 255 !!!
BITTORRENT
Multi WAN System in ClearOS
1
5
13
17
20
22
29
30
31
33
34
37
44
45
46
47
49
50
51
52
53
54
Weight (Multi-WAN)
AP (Ruta)
60
restart server ip
61
Webmin Lightsquid
Hack
LightSquid
55
56
58
59
MySQL
62
Template
63
Clear Center
64
ClearOS
1. CD-Rom USB ( BIOS)
2. ClearOS Enter
3. (English)
4. (US)
5. CD-Rom Local CDROM USB FTP
6. Install
7. ClearOS
11. Nameserver IP
12. IP Address Server LAN IP
13. (Admin)
Graphical Console
DHCP and Local DNS Servers
DMS and 1-to-1 NAT Firewall
Bandwidth Manager
Intrusion Protection
Protocol Filter
** Module **
16. Module
Web Proxy
Content Filter
Web Server
Database Server / MySQL
** Module **
( )
17.
ClearOS
1. ClearOS Reboot Login
root
Client Notebook
1. External
10
4. MaYa /root
11
5. Config file
6.
mycorporation='Smile Network'
exinterface='eth0'
interface
mydhcpif='eth1'
interface Lan IP Chilli
myradiussecret='testing123'
myuamsecret='ht2eb8ej6s4et3rg1ulp'
mysqluser='root'
user mysql
mysqlpassword='123456'
password mysql
myradius_db='sam_db'
database mysql
12
13
2. ping 10.0.1.1
14
3. 10.0.1.1
15
4. ClearOS
16
( )
17
WRT54GL Server
18
19
20
Korkai)
http://www.linuxthai.org/forum/index.php?topic=914.0
21
22
23
Upgrade rewjang
1. http://www.mediafire.com/?nnpeu7su65fkfd0
2.
3. MySQL sam_db
4.
24
5. Save File
6.
25
7. radius-sam
26
8.
9.
changepass-yes.php
register-yes.php
changepass.php
register.php
/var/www/html/sam/admin/include backup
/var/www/html/sam/admin/
10.
27
11.
28
12.
29
30
uamallow
uamallowed (), chilli/subnet
uamallowed www.google.com,10.100.1.0/24
/etc/chilli.conf /etc/chilli/config
# HotSpot settings for simple Captive Portal
#
HS_NASID=nas01
HS_UAMSECRET=ht2eb8ej6s4et3rg1ulp
HS_RADIUS=127.0.0.1
HS_RADIUS2=127.0.0.1
HS_RADSECRET=testing123
HS_UAMALLOW=10.111.1.0/24,10.0.0.0/8
31
2. Login
<ul><li> <a
href="admin/register.php">< /a></li><li>
</li><li> <a href="admin/changepass.php">
</a></li>
</ul>
Login ( ^_^ )
32
website.txt
Block Web & Download
# touch /etc/squid/filename.txt
# touch /etc/squid/website.txt
# chmod 777 /etc/squid/filename.txt
# chmod 777 /etc/squid/website.txt
# chown squid:squid /etc/squid/filename.txt
# chown squid:squid /etc/squid/website.txt
# ls -l /etc/squid/filename.txt
-rwxrwxrwx 1 squid squid 0 Sep 8 16:18 /etc/squid/filename <---
[root@hotspot1 ~]# ls -l /etc/squid/website.tx
-rwxrwxrwx 1 squid squid 47 Sep 8 16:21 /etc/squid/website.txt <---
33
Log File ?
#tail -f /var/log/squid/access.log
34
Server ()
Time Server UNIX Linux
ntp
http://www.ntp.org/downloads.html
wget
# wget http://www.eecis.udel.edu/~ntp/ntp_spool/ntp4/ntp-4.2.0.tar.gz
tar-ball tar
# tar -xzvf ntp-4.2.0.tar.gz
ntp-4.2.0 compile shell script configure
# cd ntp-4.2.0
# ./configure
compile make
# make
make install
# make install
ntpdate
ntpdate Time Server Time Server
root ntpdate
clock.thaicert.nectec.or.th
# ntpdate clock.thaicert.nectec.or.th
10 Sep 15:16:14 ntpdate[2264]: step time server 203.185.132.187 offset 10.006533 sec
cron job
30 * * * * ntpdate clock.thaicert.nectec.or.th
cron job Time Sever clock.thaicert.nectec.or.th
daemon ntpd
ntpdate Server
daemon ntpd daemon
35
o
client (
manual ntpd)
restrict 127.0.0.1
Time Server
1 Server ( Public Time Server
http://www.pool.ntp.org/)
server
36
Internet Time Tab check box Automatically synchronize with an Internet time server
Server clock.thaicert.org Update Now
OK
37
DynDNS ClearOS
38
https://tmserver.poweredbyclear.com:81/
24hr
39
https://secure.clearcenter.com
40
41
https://tmserver.poweredbyclear.com:81/ router
Port : 82
42
Router server ( Forward Port )
43
................ T_T
44
https://tmserver.poweredbyclear.com/sam/admin/
45
https://tmserver.poweredbyclear.com/report
46
ip 10.0.1.2 - 10.0.1.10
chilli.conf /etc/
dynip 10.0.1.10/24:10.0.1.254/24
47
24
manage_group.php
264 - 297
<tr>
<td height="30" colspan="2" align="right" valign="top" bgcolor="<?= $bgcolor ?>">Login 1 : </td>
<td height="30" colspan="3" align="left" valign="top" bgcolor="<?= $bgcolor ?>"><select name="s_time2" id="s_time2" >
<option value="3600" <? if($attribute_v[1]=='3600'){echo"selected=\"Selected\"";}?>>1 </option>
<option value="7200" <? if($attribute_v[1]=='7200'){echo"selected=\"Selected\"";}?>>2 </option>
<option value="10800" <? if($attribute_v[1]=='10800'){echo"selected=\"Selected\"";}?>>3 </option>
<option value="14400" <? if($attribute_v[1]=='14400'){echo"selected=\"Selected\"";}?>>4 </option>
<option value="18000" <? if($attribute_v[1]=='18000'){echo"selected=\"Selected\"";}?>>5 </option>
<option value="21600" <? if($attribute_v[1]=='21600'){echo"selected=\"Selected\"";}?>>6 </option>
<option value="25200" <? if($attribute_v[1]=='25200'){echo"selected=\"Selected\"";}?>>7 </option>
<option value="28800" <? if($attribute_v[1]=='28800'){echo"selected=\"Selected\"";}?>>8 </option>
<option value="36000" <? if($attribute_v[1]=='36000'){echo"selected=\"Selected\"";}?>>10 </option>
<option value="54000" <? if($attribute_v[1]=='54000'){echo"selected=\"Selected\"";}?>>15 </option>
<option value="72000" <? if($attribute_v[1]=='72000'){echo"selected=\"Selected\"";}?>>20 </option>
<option value="0" <? if($attribute_v[1]=='0'){echo"selected=\"Selected\"";}?>></option>
</select></td>
</tr>
<tr>
<td height="30" colspan="2" align="right" valign="top" bgcolor="<?= $bgcolor ?>"> :</td>
<td height="30" colspan="3" align="left" valign="top" bgcolor="<?= $bgcolor ?>"><select name="d_time2" id="d_time2">
<option value="3600" <? if($attribute_v[3]=='3600'){echo"selected=\"Selected\"";}?>>1 </option>
<option value="7200" <? if($attribute_v[3]=='7200'){echo"selected=\"Selected\"";}?>>2 </option>
<option value="10800" <? if($attribute_v[3]=='10800'){echo"selected=\"Selected\"";}?>>3 </option>
<option value="14400" <? if($attribute_v[3]=='14400'){echo"selected=\"Selected\"";}?>>4 </option>
<option value="18000" <? if($attribute_v[3]=='18000'){echo"selected=\"Selected\"";}?>>5 </option>
<option value="21600" <? if($attribute_v[3]=='21600'){echo"selected=\"Selected\"";}?>>6 </option>
<option value="25200" <? if($attribute_v[3]=='25200'){echo"selected=\"Selected\"";}?>>7 </option>
<option value="28800" <? if($attribute_v[3]=='28800'){echo"selected=\"Selected\"";}?>>8 </option>
<option value="36000" <? if($attribute_v[3]=='36000'){echo"selected=\"Selected\"";}?>>10 </option>
<option value="54000" <? if($attribute_v[3]=='54000'){echo"selected=\"Selected\"";}?>>15 </option>
<option value="72000" <? if($attribute_v[3]=='72000'){echo"selected=\"Selected\"";}?>>20 </option>
<option value="2592000" <? if($attribute_v[3]=='2592000'){echo"selected=\"Selected\"";}?>></option>
</select></td>
48
338 371
<tr>
<td height="30" colspan="2" align="right" valign="top" bgcolor="#F6F6B6">Login 1 : </td>
<td height="30" colspan="3" align="left" valign="top" bgcolor="#F6F6B6"><select name="s_time" id="s_time" >
<option value="3600">1 </option>
<option value="7200">2 </option>
<option value="10800">3 </option>
<option value="14400">4 </option>
<option value="18000">5 </option>
<option value="21600">6 </option>
<option value="25200">7 </option>
<option value="28800">8 </option>
<option value="36000">10 </option>
<option value="54000">15 </option>
<option value="72000">20 </option>
<option value="0"></option>
</select></td>
</tr>
<tr>
<td height="30" colspan="2" align="right" valign="top" bgcolor="#F6F6B6"> :</td>
<td height="30" colspan="3" align="left" valign="top" bgcolor="#F6F6B6"><select name="d_time" id="d_time">
<option value="3600">1 </option>
<option value="7200">2 </option>
<option value="10800">3 </option>
<option value="14400">4 </option>
<option value="18000">5 </option>
<option value="21600">6 </option>
<option value="25200">7 </option>
<option value="28800">8 </option>
<option value="36000">10 </option>
<option value="54000">15 </option>
<option value="72000">20 </option>
<option value="2592000"></option>
</select></td>
371: </tr>
49
IP 255 !!!
: 255
1. 192.168.1.xxx 1 192.168.2.xxx 1
2. server
3. Authen
50
51
Allowed MAC
/ chilli.conf
( /etc/chilli.conf /etc/chilli/config
12-24-21-04-B7-37 12242104B737
52
BITTORRENT
Bittorrent Server
copy Server
http://tdb.thaigqsoft.com//index.php
53
54
(Clear ram)
Crontab
59 * * * * root echo 3 > /proc/sys/vm/drop_caches
1 (59 )
55
Weight (Multi-WAN)
weight , weight ,
2 , weight
2 , LoadBalance , weight
2 ( A B )
weight A = 1, B = 1
A B C
( A ( ) B ()
weight A = 10, B = 1
A ( 10%, weight 10
10%) 10% connection
B
weight A = 10, B = 10
A, B
10% connection
10% connection B
weight A = 100, B = 1
A , A 100%, connection
B A 100%, connection A
:
weight = 1 , Balance
,
-
weight , A, B
2 2
. . B A
. , . . A,
56
Webmin Lightsquid
1. Download Webmin http://www.webmin.com/download.html
2. SSH server tar zxvf webmin-1.520.tar
3.
( )
[root@one util]# tar zxvf webmin-0.990.tar.gz
file setup
[root@one util]# cd webmin-0.990
[root@one webmin-0.990]# ./setup.sh <---
***********************************************************************
*
Welcome to the Webmin setup script, version 0.990
*
***********************************************************************
Webmin is a web-based interface that allows Unix-like operating
systems and common Unix services to be easily administered.
Installing Webmin in /util/webmin-0.990 ...<--- Enter
***********************************************************************
Webmin uses separate directories for configuration files and log files.
Unless you want to run multiple versions of Webmin at the same time
you can just accept the defaults.
Config file directory [/etc/webmin]:<--- Enter
Log file directory [/var/webmin]:<--- Enter
***********************************************************************
Webmin is written entirely in Perl. Please enter the full path to the
Perl 5 interpreter on your system.
Full path to perl (default /usr/bin/perl):<--- Enter
Testing Perl ...
Perl seems to be installed ok
***********************************************************************
Operating system name: Redhat Linux
Operating system version: 7.3
***********************************************************************
Webmin uses its own password protected web server to provide access
to the administration programs. The setup script needs to know :
- What port to run the web server on. There must not be another
web server already using this port.
- The login name required to access the web server.
- The password required to access the web server.
- The hostname of this system that the web server should use.
- If the webserver should use SSL (if your system supports it).
- Whether to start webmin at boot time.
57
webmin https://ip_server:10000
58
Hack
sam
sam/admin/include
/sam/ /sam/admin/include
59
LightSquid
cd /var/www/html/lightsquid
cd /var/www/html/report ( 31/1/54 )
chmod +x *.cgi
chown -R apache:apache *
/etc/init.d/httpd restart
./check-setup.pl
./lightparser.pl
/var/www/html/report/lightparser.pl
echo '10 * * * * /var/www/html/report/lightparser.pl' >> /etc/crontab
( 31/1/54 )
Error crontap lightparser.pl
!!
/var/www/html/report/lightparser.pl crontap
60
AP (Ruta)
allow mac
HS_MACALLOW=""
/etc/chilli.conf /etc/chilli/config
nano /etc/chilli.conf
# HS_MACAUTH=on
HS_MACAUTH=on
# HS_MACAUTHDENY=on
HS_MACAUTHDENY=on
#HS_MACAUTHMODE=local
HS_MACAUTHMODE=local
# HS_MACALLOW="...."
HS_MACALLOW="0016d3f61353" MAC
/etc/init.d/chilli restart
AP ,
nano/etc/chilli.conf
HS_MACAUTH=on
HS_MACAUTHDENY=on
HS_MACAUTHMODE=local
HS_MACALLOW=0016d3f61353,0015d3f631555,abcda1c5a3aa
61
62
Protocal Filter
TMSolution ChiangMai
module
Protocal Filter
https://10.0.1.1:81
Gateway Protocal Filter
All Groups Peer to Peer
Block Bittorrent block Block All
Status : Stop Running
Bittorrent
Report -> Protocal Filter Bittorrent
:
Bittorent BitComet
Utorrent 1-100KB/s ( 80Mbps 10MB/s
1 - 100 KB/s )
63
restart server ip
crontab
# nano /etc/crontab
webmin
@daily root /sbin/shutdown -r now >>restart
64
MySQL
login
1. Stop service MySQL
[root@khonkaensoft]#sudo /etc/init.d/mysql stop # for ubuntu or debian base
2. Start MySQL save mode.
[root@khonkaensoft]# mysqld_safe skip-grant-tables &
3. Login MySQL root
[root@khonkaensoft]# mysql -u root
4. Update root
mysql> use mysql;
mysql> update user set password=PASSWORD(NEW PASSWORD) where
user=root;
mysql> flush privileges;
mysql> quit;
5. Restart the MySQL service & try to login using the new password.
[kk-soft@khonkaensoft]# sudo /etc/init.d/mysql stop
[kk-soft@khonkaensoft]# sudo /etc/init.d/mysql start
MySQL
[root@khonkaensoft]# mysql -u root -p
==========================================================
MySQL on ubuntu
[kk-soft@khonkaensoft]# sudo /etc/init.d/mysql reset-password
65
Template
folder templates
css
images
css
manage_interface.php
38 }
37 if($bg=="temp14") {return "<img src=\"templates/temp14/images/login.png\" width=\"120\"
height=\"80\">";}
38 if($bg=="") {return "<img src=\"templates/
/images/login.png\" width=\"120\" height=\"80\">";}
39 }
54 }
53 if($bg=="temp14") {return "<img src=\"templates/temp14/images/popup.png\" width=\"120\"
height=\"80\">";}
54 if($bg=="") {return "<img src=\"templates/
/images/popup.png\" width=\"120\" height=\"80\">";}
55 }
100 </select></td>
66
Clear Center
server Register ClearOS
Login https://secure.clearcenter.com/portal/index.jsp
67
68
69
70
71
ClearOS ( )
https://10.0.1.1:81/admin/index.php
user : root / pass :
MySQL
https://10.0.1.1:81/mysql/
user : root / pass : 123456
password root
sudo passwd root
reboot server
............
PPPoE External (
Switch Hub )
MaYa Server