Showing posts with label Security. Show all posts
Showing posts with label Security. Show all posts

Monday, May 25, 2009

Testing IP-CCTV Vivotek 7131


Just this week I could write about IP CCTV. But already about 8 months ago, i borrowed IP-CCTV by vendor, this brand is Vivotek with type: IP7131 , This type is static IP-CCTV, it costs about U.S. $ 300 at online store, at other online store , it costs are around 2.7 million.
The s
pecification as follows:

▪ Camera Type: Network Camera-Fixed
▪ Sensor Type: 1/4" VGA CMOS Sensor
▪ Sensor Resolution: Up to 30fps in Full VGA
▪ Video Compression: MPEG-4 Ipcam
▪ Interface: Ethernat 10Base-T/100Base-TX. IEEE 802.11g
▪ P rotocols: RTP/IP, UDP/IP, TCP/IP, SMTP/HTTP/FTP, DNS and DHCP client and DDNS
▪ Special Feature 1: Power over Ethernet
▪ Special Feature 2: Support 3GPP/ISMA Mobile Surveillance
▪ Dimension: 3.79 in x 6.4 in x 1.9 in
▪ Power Supply: DC 5V
▪ Warranty: 1 year

Overall quality is good, the disadvantage : only can not be rotated because of the static type. To configure this IP-CCTV, use Internet Explorer browser, instead of Firefox browser, because it uses ActiveX. Firefox does not currently support ActiveX.
Screenshot Administrator panel via the web :



Monday, May 18, 2009

Integration between OpenLDAP and FreeRadius

Edit file radiusd.conf. At the part of ldap line, fill the server with ip address and basedn of ldap server.
For example the following:
ldap {
server = "192.168.1.2"
# identity = "cn=admin,o=My Org,c=UA"
# password = mypass
basedn = "o=ICT Indonesia"

Marked # on the following lines:

#access_attr = "dialupAccess"

At part of authorize, open comments from the following lines:
ldap

At part of authenticate, open comments from the following lines:
Auth-Type LDAP {
ldap

}

The above configuration is if our ldap server use clear text password. This is based on my experience, my previous attempt to use features dialupAccess and make comments on the Auth-Type LDAP but failed, and always appears the following error message:
no dialupAccess attribute - access denied by default

I test this with NTRadPing Utilities (didownlod be in here), the results:


After I disable DialupAccess and enable Auth-Type LDAP, connection to LDAP run successfully.

In the debug mode, we can see user and password from the ldap server as follows:


Do not forget to save the configuration and restart the radiusd service.
Happy Testing!!!

Sunday, May 17, 2009

Server connection between FreeRadius and NAS ISP

If we have a subscription with the VPN ISP(Virtual Private Network Internet Service Provider), and have our own FreeRadius server, we can perform integration with NAS ISP(Network Access Server ISP) . So mobile users can connect to our Local Area Network with VPN ISP.

So that integration between NAS ISP and freeradius server can run smoothly , we need to be setting in our freeradius server. Setting connection with NAS ISP is easy, edit file clients.conf in the directory /usr/local/etc/raddb, add the following lines:
client 192.168.1.2 (
secret = secret
shortname = NAS_ISP)
  • 192.168.1.2 =Ip Address NAS ISP
  • secret = password used by the NAS ISP as encryption and signature with our radius server
  • shortname = alias domain or IP Address NAS ISP

Next log recorded by radacct in /usr/local/var/log/radius/radacct:
Thu May 15 14:02:01 2008
NAS-Identifier = "Juniper IVE"
User-Name = "beni.santoso(Users)[Users]"
Acct-Multi-Session-Id = "beni.santoso(Users)"Thu May 15 14:00:23 2008""
Acct-Link-Count = 2
NAS-IP-Address = 192.168.1.2
NAS-Port = 1
Acct-Status-Type = Start
Framed-IP-Address = 125.161.61.139
Acct-Session-Id = "beni.santoso(Users)"Thu May 15 14:00:23 2008"NC"
Acct-Authentic = RADIUS
Client-IP-Address = 192.168.1.2
Acct-Unique-Session-Id = "53a366e82b8aa8c1"
Timestamp = 1210834921
That's it guys!!!

Saturday, May 16, 2009

Installation FreeRadius on Linux part 3

After installation and setup is finished, we can set up so that each time the service radiusd automatically executed. This is how to configure automatic service at boot time:
  • Login as root.
  • Copy freeradius-1.1.7/scripts/rc.radiusd to /etc/init.d #cp freeradius-1.1.7/scripst/rc.radiusd /etc/init.d/radiusd
  • Change the file permission to 755, #chmod 755 /etc/init.d/radiusd
  • Edit radiusd file, add the following line at the top of the file (this is only for information only):
# chkconfig: 2345 80 30
# description: FreeRadius 1.1.7
# processname: radiusd
# pidfile: $rundir/radiusd.pid
  • Make link to radiusd. Go to the directory /etc/rc3.d #link -s /etc/init.d/radiusd /etc/rc3.d/S80radiusd.
Number 80 can be changed with the other number which is not conflicts with the other service, check whether the number is already used by another service, can be seen in the directory /etc/rc3.d or in /etc/rc5.d. (rc3 , for multi-user mode, rc5 for X11 mode). In this case I only put in multiuser mode only.
  • To check whether the service is on the radiusd on init 3 mode can be checked using the command # chkconfig --list.
  • Radiusd has function to start, stop and restart the service radius.
  • Make a testing to run #/etc/init.d/radiusd start (to run the service radius), and #/etc/init.d/radiusd stop (to stop the service radius), or #/etc/init.d/radiusd restart (to restart service radius).
  • If all goes smoothly, try booting the server.
  • Configuring radiusd service has been completed.

Thursday, May 14, 2009

Installation FreeRadius on Linux part 2

After you have finished installing and testing in the previous section, it's time to do the integration FreeRadius with MySQL database. Do not forget, MySQL database is installed correctly and running well. Ensure service http, mysql is running properly. For Centos/Redhat/RHEL/Fedora Distro, run /etc/init.d/httpd status and /etc/init.d/mysqld status.


Step by step configuration:

1. Create a new database, eg: radius
#mysqladmin-u root-p create a radius, to check, try login to database, #mysql-u root-p radius.


2. Import schema database from file db_mysql.sql, if nothing ,can be downloaded in here.
#mysql -u root -p radius <>.

#mysql -u root -p radius
mysql > show tables;


3. Edit file /usr/local/etc/raddb/sql.conf, edit line server, login, password and radius_db. In order to connect to the server and the MySQL database radius.
For example:
server = "localhost"
login = "root"
password = "yourpassword"
radius_db = "radius"

4. Edit file /usr/local/etc/raddb/radiusd.conf.
Add in word "sql" at part of Authorize and accounting, see the section on the following:
authorize {
preprocess
chap
mschap
#counter
#attr_filter
#eap
suffix
sql

files
#etc_smbpasswd
}

accounting {
acct_unique
detail
#counter
unix
sql
radutmp
#sradutmp
In authorize, place sql before files(if we do not want to use files, we can give comment (# sign) in front of files), and in accounting, place sql between unix and radutmp.
5. Create a dummy user in the table usergroups, radcheck, radreply, radgroupreply and radgroupcheck. You can use the mysql or phpmyadmin (can be downloaded in here).
mysql > select * from usergroup;

mysql > select * from radcheck;

mysql > select * from radreply;
mysql > select * from radgroupreply;

mysql > select * from radgroupcheck;


6. Run again with a radius debug mode, #/usr/local/sbin/radiusd -X.
7. Perform testing with radtest, eg such as data is entered above #radtest beni beni localhost 1812 testing123
The result is as follows:

Debugnya process can be viewed on the display mode debugnya:

8. Congratulations!!! You have finished integration between FreeRadius and MySQL database successfully.

Monday, May 11, 2009

Installation FreeRadius on Linux part 1

I take an Elastix linux distro, with PHP 5.1.6, Apache 2.2.3, MySQL 5.0.22 and FreeRadius 1.1.7.

Step by step installation and testing:
1. Download Freeradius in www.freeradius.org, take the package freeradius-1.1.7.tar.gz.
2. Untar freeradius ==> #tar-xvzf freeradius-1.1.7.tar.gz
3. Log in to freeradius directory ==> #cd freeradius
4. #./configure , if we do not enter any parameters, the results of the installation will be stored in /usr/local, either in the directory bin, sbin, etc, lib and var.
If you want to use the ldap module, we also need to install openldap and openldap-devel package.
Here are some parameters that need to be if we want to install in accordance with the laying of the directory that we want:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
For example:
#./configure --bindir=/usr/bin --sbindir=/usr/sbin --libexecdir=/usr/libexec --sysconfdir=/etc --localstatedir=/var/log --libdir=/usr/lib --includedir=/usr/include
5. #make , compile the program.
If there is an error message as follows:
In file included from rlm_sqlippool.c:37:
/usr/ports/net/freeradius/work/freeradius-1.1.2/src/include/modpriv.h:7:18:
ltdl.h: No such file or directory
In file included from rlm_sqlippool.c:37:
/usr/ports/net/freeradius/work/freeradius-1.1.2/src/include/modpriv.h:16:
error: syntax error before "lt_dlhandle"
In file included from rlm_sqlippool.c:39:
../rlm_sql/rlm_sql.h:15:18: ltdl.h: No such file or directory
In file included from rlm_sqlippool.c:39:
../rlm_sql/rlm_sql.h:68: error: syntax error before "lt_dlhandle"
gmake[6]: *** [rlm_sqlippool.lo] Error 1
Then run make again
6. #make install, all configuration file, executable file, include and library will be installed to the default installation parameters.
7. If you have finished, do the testing. First, create a user. Because I do a default installation, the configuration directory is in /usr/local/etc/raddb, edit file /usr/local/etc/raddb/users, enter the user as follows:
steve Auth-Type := Local, User-Password := "testing"
Service-Type = Framed-User,
Framed-Protocol = PPP,
Framed-Routing = Broadcast-Listen,
Framed-Filter-Id = "std.ppp",
Framed-MTU = 1500,
Framed-Compression = Van-Jacobsen-TCP-IP
8. Test with radtest tool, with format: radtest server port user password secret. Secret password can be found in /usr/local/etc/raddb/clients.conf.
Run #radtest steve testing localhost 1812 testing123
If successful a result is as follows:

If failed, the message is Access-reject, re-check the configuration if there is still a wrong configuration.
9. At this moment, installation, configuration and testing is OK.
10. For integration with MySQL, follow my next posting.

Saturday, May 9, 2009

Overview Radius and FreeRadius

What is Radius? Radius stands on Remote Authentication Dial in User Service, is an AAA protocol (Authentication, Authorization and Accounting), which control access to resources in the network data. Their use is widespread, especially among the ISP (Internet Service Provider). Usually used with Nas (Network Access Server) and the PPP protocol for Dial Up via modem. This is still used by many ISPs at this time.

Standard port is the radius of 1812 (for Authentication) and 1813 (for Accounting). It is used by Radius and FreeRadius Server Microsoft, Cisco and Juniper use port 1645 and 1646. Here's a list of servers that radius both open source and commercial. For the opensource: FreeRadius, OpenRadius, GNU Radius, CistronRadius. For the commercial: Microsoft Radius Server, Aradial Radius Server, Cisco Secure Access Control Server for Windows, etc..

What is FreeRadius? FreeRadius radius server that is quite popular in the open source world. Developed by Alan DeKok and Miquel van Smoorenburg in 1999. Previously, Miquel develop Cistron Radius, but then became inactive developed. FreeRadius be widely accepted and received support from the opensource community. Otherwise to supporting text file, supporting LDAP, SQL (MySQL, Oracle, PostgreSQL, MSQL, etc), and EAP. FreeRadius itself claimed quite fast, feature rich, reliable and scalable. Free Radius run on many platforms such as Windows OS family Linux / Unix, Mac OS, Sun Solaris.

Features of the Free Radius :
  • Having a high performance, support HA, Fail-Over.
  • Feature rich, supporting many Operating System, EAP, Database, AAA functionality, Virtual Server, Proxy, etc..
  • Modular, support addon / plugin addition, it can be implemented on the embedded system.
  • Scalability, the high burden for supporting freeradius based on the maximum request and the maximum server (cpu).