Sie sind auf Seite 1von 5

24/05/13

CONFIGURE & INSTALL: Easyhotspot in Centos 6.4

C O N F I G U R E&I N S T A L L
./configure; make; make install
Hom e LINUX SQUID HOT SPOT MIKROT IK WINDOWS Links Download My Labs About Me

Saturday, March 30, 2013

Translate

Easyhotspot in Centos 6.4


Actually a lot of to discuss about making this hotspot. But I see it is not discussed fully. And mostly use Ubuntu. I will explain how to make easyhotspot in centos 6.4, based on my experiment. I divide it into 4 parts, to make it more easily understood. 1. Install Apache, PHP and Mysql. 2. Install Web Easyhotspot. 3. Install Freeradius 2.1.12. 4. Install Chillispot. 1. Install Apache, PHP and Mysql. I assume the PC is installed with centos 6.4. In my experiments, centos installed in a minimalist package. Configure the network interface. (Watch carefully, I use 2 lan card, which happened to be detected as eth1 and eth2. Eth1 to use static ip, and the ip dhcp eth2. So please do adjustments IP address, in accordance with the conditions in your network, I know you can do it). vi /etc/sysconfig/network -scripts/ifcfg-eth1 DEVICE=eth1 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=static IPADDR=192.168.10.1 NETMASK=255.255.255.0 vi /etc/sysconfig/network -scripts/ifcfg-eth2 DEVICE=eth2 TYPE=Ethernet ONBOOT=yes NM_CONTROLLED=yes BOOTPROTO=dhcp service network restart And should be connected to the internet. Continue with the order to install wget and install updates and other applications. yum install wget wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -ivh epel-release-6-8.noarch.rpm yum repolist. yum update yum install mc vim unzip gcc gcc-c++ mak e git svn nano yum install mysql-server php httpd php-mysql php-xml php-gd php-pear php-db yum install patch mod_ssl openssl dnsmasq wget http://pear.php.net/go-pear.phar php go-pear.phar pear install DB Check in / etc / php.ini, mak e sure several lines of configuration is suitable. short_open_tag = On date.timezone = Asia/Mak assar Service httpd and mysqld must be running automatically, so chk config --level 235 httpd on chk config --level 235 mysqld on chk config --level 235 dnsmasq on 2. Install Web Easyhotspot Download easyhotspot web from https://github.com/rafeequl. cd /opt git clone https://github.com/rafeequl/EasyHotspot ln -s /opt/EasyHotspot/htdocs /var/www/html/easyhotspot Create database easyhotspot_opensource. mysql mysql> create database easyhotspot_opensource; mysql> CREATE USER 'easyhotspot'@'localhost'; mysql> SET PASSWORD FOR 'easyhotspot'@'localhost' = PASSWORD('easyhotspot');

Seleccionar idioma
Con la tecnologa de

Traductor de Google

Search

Search

Blog Archive

2013 (28) May (5) April (6) March (6) Easyhotspot in Centos 6.4 httpd: apr_sockaddr_info_get() failed for "hostnam... Cache Youtube Video with Squid 3.3.2 and Nginx Transparent Squid 3.3.2 on Ubuntu 12.10 + Shorewal... Transparent Squid 3.3.2 / 3.2.8 on Ubuntu 12.10 +... Squid 3.3.2 / 3.2.8 : Example Squid.conf February (3) January (8) 2012 (14)

Labels

LINUX (33) HOTSPOT (15) SQUID (12) MIKROTIK (8) CACTI (4) WINDOWS (4) SNMP (3) SHOREWALL (2) CISCO (1)

2 1 7 3 1
1/5

myconfigure.blogspot.com/2013/03/easyhotspot-in-centos-64.html

24/05/13

CONFIGURE & INSTALL: Easyhotspot in Centos 6.4


mysql> GRANT ALL ON easyhotspot_opensource.* to 'easyhotspot'@'localhost'; mysql> quit mysql -u root easyhotspot_opensource < /opt/EasyHotspot/install/database_with_sample.sql Now open browser and link to http://<ip address>/easyhotspot

Follow ers

Join this site


w ith Google Friend Connect

Members (3)

Already a member? Sign in

PhpMyPrepaid on Fedora 18 (22 comments)

There is no password for Mysql root, so if you want to change the mysql root password, do this mysqladmin -u root password <new password> Then edit /var/www/html/easyhotspot/system/application/config/database.php Place the login file for client to /var/www/cgi-bin/ cp /opt/EasyHotspot/hotspot/hotspotlogin.cgi /var/www/cgi-bin/ edit hotspotlogin.cgi file and make sure uamsecret is correct. uamsecret = easyhotspot 3. Install Freeradius 2.1.12 yum install freeradius freeradius-mysql freeradius-utils chk config --level 235 radiusd on Edit /etc/raddb/clients.conf and in the client localhost section make sure you have, ipaddr = 127.0.0.1 secret = easyhotspot nastype = other Edit /etc/raddb/radiusd.conf and in the module section, uncomment $INCLUDE sql.conf $INCLUDE sql/mysql/counter.conf Then, in the instantiate section, add chillispot_max_bytes noresetcounter Then in /etc/raddb/sites-enabled/default in the authorize section, uncomment sql and add the new counters so that it is now, sql chillispot_max_bytes noresetcounter and then later in /etc/raddb/sites-enabled/default in the accounting section uncomment the sql sql and then later in /etc/raddb/sites-enabled/default in the session section uncomment the sql sql and then finally in /etc/raddb/sites-enabled/default in the post-auth section uncomment the sql, sql Edit the /etc/raddb /sql/mysql/counter.conf file and in that at the end (unless the counter is already defined in that), add the following, How to Create Voucher in Mikrotik sqlcounter noresetcounter { User Manager counter-name = Session-Timeout check -name = Session-Timeout reply-name = Session-Timeout sqlmod-inst = sql k ey = User-Name reset = never query = "SELECT SUM(Acctsessiontime) FROM radacct WHERE UserName='%{%k }'" } sqlcounter chillispot_max_bytes { counter-name = Max-All-MB check -name = Max-All-MB reply-name = ChilliSpot-Max-Total-Octets sqlmod-inst = sql k ey = User-Name reset = never query = "SELECT SUM(AcctInputOctets + AcctOutputOctets) / 1048576 FROM radacct WHERE UserName='%{%k }'" } Edit /etc/raddb/sql.conf file, at the sql section, make sure you have configuration, database = "mysql" driver = "rlm_sql_${database}"
RECOMMENDED FOR Y OU

How a Hotspot Billing System Works (0 comments)

Upgrade Squid 3.1.22 to 3.3.3 (0 comments)

Configure Mikrotik as a Hotspot (0 comments)

myconfigure.blogspot.com/2013/03/easyhotspot-in-centos-64.html

2/5

24/05/13
server = "localhost" #port = 3306 login = "easyhotspot" password = "easyhotspot" radius_db = "easyhotspot_opensource"

CONFIGURE & INSTALL: Easyhotspot in Centos 6.4

Run freeradius. If there is no error, thats mean freeradius is running normally. Radiusd -X 4. Install Chillispot Download and install chillispot. cd /usr/local wget http://www.chillispot.info/download/chillispot-1.1.0.tar.gz tar zxvf chillispot-1.1.0.tar.gz wget http://www.0xf8.org/wp-content/uploads/2011/09/chillispot-1.1.0-tun.c_defined.diff wget http://www.0xf8.org/wp-content/uploads/2011/09/chillispot-1.1.0-md5.c.diff cd chillispot-1.1.0 ./configure patch -p1 < /usr/local/chillispot-1.1.0-tun.c_defined.diff patch -p1 < /usr/local/chillispot-1.1.0-md5.c.diff mak e mak e install Download and install haserl cd /usr/local wget http://sourceforge.net/projects/haserl/files/haserl-devel/0.9.27/haserl-0.9.27.tar.gz/download tar zxvf haserl-0.9.27.tar.gz cd haserl-0.9.27 ./configure; mak e; mak e install ln -s /usr/local/bin/haserl /usr/sbin/ copy some important chillispot file. cp /usr/local/chillispot-1.1.0/doc/firewall.iptables /etc/init.d/ cp /usr/local/chillispot-1.1.0/doc/chilli.init /etc/init.d/chillispot chmod 755 /etc/init.d/chillispot cp /usr/local/chillispot-1.1.0/doc/chilli.conf /etc/ ln -s /usr/local/sbin/chilli /usr/sbin/ chk config --add chillispot chk config --level 235 chillispot on edit /etc/chilli.conf, uncomment and edit some line important configuration. vim /etc/chilli.conf net 192.168.182.0/24 dns1 192.168.182.1 dns2 8.8.8.8 radiusserver1 127.0.0.1 radiusserver2 127.0.0.1 radiussecret easyhotspot radiusauthport 1812 radiusacctport 1813 dhcpif eth1 uamserver https://192.168.182.1/cgi-bin/hotspotlogin.cgi uamhomepage http://192.168.182.1:3990/prelogin uamsecret easyhotspot uamlisten 192.168.182.1 uamport 3990 coaport 3799

Edit /etc/init.d/chillispot. Make sure a line below is uncomment. echo 1 > /proc/sys/net/ipv4/ip_forward service chillispot restart Now run the chillispot service chillispot restart Edit firewall.iptables file. In my case external interface (connected internet) is eth2. And then I add some line command iptables. You can modify this file according your desire. vim /etc/init.d/firewall.iptables #!/bin/sh # Firewall script for ChilliSpot IPTABLES="/sbin/iptables" EXTIF="eth2" INTIF="eth1" #Flush all rules $IPTABLES -F $IPTABLES -F -t nat $IPTABLES -F -t mangle #Set default behaviour $IPTABLES -P INPUT DROP $IPTABLES -P FORWARD ACCEPT $IPTABLES -P OUTPUT ACCEPT #Allow related and established on all interfaces (input) $IPTABLES -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT

myconfigure.blogspot.com/2013/03/easyhotspot-in-centos-64.html

3/5

24/05/13

CONFIGURE & INSTALL: Easyhotspot in Centos 6.4


#Allow releated, established and ssh on $EXTIF. Reject everything else. $IPTABLES -A INPUT -i $EXTIF -p tcp -m tcp --dport 22 --syn -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p tcp -m tcp --dport 80 --syn -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -j REJECT #Allow related and established from $INTIF. Drop everything else. $IPTABLES -A INPUT -i $INTIF -p tcp -m tcp --dport 53 --syn -j ACCEPT $IPTABLES -A INPUT -i $INTIF -j DROP #Allow http and https on other interfaces (input). #This is only needed if authentication server is on same server as chilli $IPTABLES -A INPUT -p tcp -m tcp --dport 80 --syn -j ACCEPT $IPTABLES -A INPUT -p tcp -m tcp --dport 443 --syn -j ACCEPT #Allow 3990 on other interfaces (input). $IPTABLES -A INPUT -p tcp -m tcp --dport 3990 --syn -j ACCEPT #Allow ICMP echo on other interfaces (input). $IPTABLES -A INPUT -p icmp --icmp-type echo-request -j ACCEPT #Allow everything on loopback interface. $IPTABLES -A INPUT -i lo -j ACCEPT # Drop everything to and from $INTIF (forward) # This means that access points can only be managed from ChilliSpot $IPTABLES -A FORWARD -i $INTIF -j DROP $IPTABLES -A FORWARD -o $INTIF -j DROP #Enable NAT on output device $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE Save. Now add in /etc/rc.local, then when reboot, will be running automatically. vim /etc/rc.local /etc/init.d/firewall.iptables Done, now reboot. From the client computer, cek IP address. Computer client should receive an IP address, 192.168.182.xxx. Open browser, you should get redirection login page. Below link to my backup file , maybe it's useful. Link 1 : EasyHotspot.zip Link 2 : File Easyhotspot.zip

Reference : http://rafeequl.files.wordpress.com/2009/08/easyhotspot-install-guide-for-0-2.pdf. Licence : EasyHotspot released under GPL, so that you can use it freedom.

R el at ed P o st s

Configure Mikrotik as a Hotspot

How a Hotspot Billing System Works

Upgrade Squid 3.1.22 to 3.3.3

PhpMyPrepai d on Fedora 18

How to Fix PhpMyPrepai d 0.4.rc3

By Nadia Farhana Wardah at 10:43 PM Label: HOTSPOT, LINUX

Recommend this on Google

4 comments:
Anonymous April 4, 2013 at 12:14 PM When client is connect to redirection login page. I found following error on my client The requested URL /welcome.html was not found on this server. Apache/2.2.15 (CentOS) Server at 192.168.182.1 Port 80 So how to fix this problem Reply Replies NGERI April 14, 2013 at 2:48 PM edit in /etc/chilli.conf, make sure like this... uamserver https://192.168.182.1/cgi-bin/hotspotlogin.cgi uamhomepage http://192.168.182.1:3990/prelogin and restart your chillispot. Reply

myconfigure.blogspot.com/2013/03/easyhotspot-in-centos-64.html

4/5

24/05/13
Anonymous April 5, 2013 at 4:24 PM Authentication failed problem how to fix pls Reply Replies NGERI April 14, 2013 at 2:51 PM

CONFIGURE & INSTALL: Easyhotspot in Centos 6.4

check your radius server again... follow my instruction to install radius server, carefully. :) Reply

E n t e ry o u rc o m m e n t . . .

Comment as: Google Account Publish Preview

Newer Post Subscribe to: Post Comments (Atom)

Home

Older Post

Copyright 2013 . Simple template. Powered by Blogger.

myconfigure.blogspot.com/2013/03/easyhotspot-in-centos-64.html

5/5

Das könnte Ihnen auch gefallen