Tampilkan postingan dengan label Ubuntu. Tampilkan semua postingan
Tampilkan postingan dengan label Ubuntu. Tampilkan semua postingan

Installing and Configuring Freeradius + MySQL and Daloradius + MySQL on Ubuntu Server 11.04 for Mikrotik Hotspot/PPoE/PPTP (Tested on VirtualBox)



Installing and Configuring Freeradius

The first step is to Install Freeradius (ensure you already update your apt with apt-update)
$sudo apt-get install freeradius 
 * Starting FreeRADIUS daemon freeradius                                 [ OK ] 
Setting up freeradius-utils (2.1.10+dfsg-3build2) ...

Then prepare the database for freeradius. Create database radius and assign username and password for accessing it. 

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 51
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> create database radius; 
mysql> grant all on radius.* to radius@localhost identified by "thepassword";
Query OK, 0 rows affected (0.00 sec)

The next step was to insert the database schema and I realized that I could not find the database scheme in /etc/freeradius.

Obviously I should install freeradius-mysql package first. 

#apt-get install freeradius-mysql
Setting up freeradius-mysql (2.1.10+dfsg-3build2) ...
 * Reloading FreeRADIUS daemon freeradius                                [ OK ] 

Then insert the database scheme 

# mysql -u root -p radius < /etc/freeradius/sql/mysql/schema.sql 
Enter password:
# mysql -u root -p radius < /etc/freeradius/sql/mysql/nas.sql 
Enter password: 

Now we try to insert new user for testing purpose in database. 

# mysql -u root -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 72
Server version: 5.5.24-0ubuntu0.12.04.1 (Ubuntu)

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use radius;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> INSERT INTO radcheck (UserName, Attribute, Value) VALUES ('sqltest', 'Password', 'testpwd');
Query OK, 1 row affected (0.04 sec)

mysql> exit
Bye

The next step is we need to configure the Freeradius files. 

Edit /etc/freeradius/sql.conf file. Setting database type, login and password that we already setup before.

# vim /etc/freeradius/sql.conf
  
  database = mysql
  login = radius
  password = thepassword

  readclients = yes

Then edit the /etc/freeradius/sites-enabled/default file

# vim /etc/freeradius/sites-enabled/default 

    Uncomment sql on authorize{}
    # See “Authorization Queries” in sql.conf
    sql

    Uncomment sql on accounting{}
    # See “Accounting queries” in sql.conf
    sql

    Uncomment sql on session{}
    # See “Simultaneous Use Checking Queries” in sql.conf
    sql

    Uncomment sql on post-auth{}
    # See “Authentication Logging Queries” in sql.conf
    sql 
      
Then we edit /etc/freeradius/radiusd.conf file

# vim /etc/freeradius/radiusd.conf 

  #Uncomment #$INCLUDE sql.conf
  $INCLUDE sql.conf

To test our configuration, first we must stop the freeradius service (if already running) 
# /etc/init.d/freeradius stop
 * Stopping FreeRADIUS daemon freeradius                                 [ OK ]

Then run this command to run freeradius in debugging mode. If there is no error, you are good to go.
#freeradius -X

On a new shell or window we tested the connection

$ radtest sqltest testpwd localhost 18128 testing123
Sending Access-Request of id 65 to 127.0.0.1 port 1812
User-Name = "sqltest"
User-Password = "testpwd"
NAS-IP-Address = 127.0.1.1
NAS-Port = 18128
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=65, length=20

The test running well with Accept response from the server.

To enable Mikrotik device to access our server we need to add client in clients.conf file.

#vim /etc/freeradius/clients.conf

client 10.0.0.0/8 {

        secret = testingpassword
        shortname = testing
        nastype= mikrotik
}

*note: we need to stop freeradius -X and then running it again to test our configuration

Update (Jan 27, 2013):  If we want to add specific value for Mikrotik, we need to add mikrotik dictionary

#vim /etc/freeradius/dictionary 


Then add this line below


$INCLUDE  /usr/share/freeradius/dictionary.mikrotik

Mikrotik Configuration

We need to configure our Mikrotik devices to use our new radius server.  We need to login to Mikrotik device and configure the radius in Radius menu. 

Below image is an example of our configuration. 


*Note: we increase timeout settting to 3000ms to enable invalid login notifications. (not working with default 300ms)
You can setting Mikrotik Hotspot using that Radius if you want, or can use another hotspot software like easyHotspot


Daloradius Installation 

First, we need to download daloradius file 

$wget http://downloads.sourceforge.net/project/daloradius/daloradius/daloradius0.9-9/daloradius-0.9-9.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fdaloradius%2Ffiles%2F&ts=1345296201&use_mirror=nchc

Rename and extract the file 

# tar xvfz daloradius-0.9-9.tar.gz
# mv daloradius-0.9-9 daloradius

Move the file to the web server directory. In this case I use apache on Ubuntu so the location is at /var/www

# mv daloradius-0.9-9 daloradius
# mv daloradius /var/www

Then we need to setup the database. Because already setup the freeradius using MySQL, so we don't need new database. All we need to do is to import the daloradius scheme into our existing radius database.

# cd /var/www/daloradius/contrib/db
# mysql -u root -p radius < mysql-daloradius.sql

After database successfully altered, we need to configure the daloradius setting.

#vim /var/www/daloradius/library/daloradius.conf.php

Change the database password 

$configValues['CONFIG_DB_PASS'] = 'thepassword';

Then we can try to access daloradius using http://ipaddressoftheserver/daloradius

*Note: In my installation, i had a problem because I didn't have php5-gd php-pear and php-db packages installed on my Ubuntu server. 

To deal with this problem you can install the packages using

# apt-get install php5-gd php-pear php-db 




If some time going wrong..cek this
DEBUG : 

Failed binding to authentication address * port 1812: Address already in use
/etc/freeradius/radiusd.conf[240]: Error binding to port for 0.0.0.0 port 1812
ps aux | grep free
or
ps ax | grep radius
check for the process already running.
kill -9 PID
then start radius in debug mode.
/usr/sbin/freeradius -X you probably have one started manually and one from init.d, and they are arguing over port access.
After all, when you kill the PID.
Just start the freeradius from demon.
/etc/init.d/freeradius start
Start normally.
Now to confirm everything is working fine, restart the server.
/etc/init.d/freeradius restart
If there is any issue, Comments here.

References, 

http://andrewpakpahan.blogspot.com/2012/08/installing-and-configuring-freeradius.html
http://techinfozone.net/failed-binding-authentication-address-port-1812-address-already-use-freeradius/

10 Pertanyaan yang paling sering ditanyakan seputar Linux

Bahkan saat Linux mengumpulkan uap dalam hal semakin banyak orang mulai mengambil OS sebagai mekanisme pilihan mereka bekerja , masih banyak skeptis yang telah memilih untuk tetap jauh dari Linux untuk kebutuhan informasi dan pemahaman . Kami membawa Anda jawaban atas sepuluh pertanyaan yang paling sering ditanyakan tentang OS Linux :
 
1 . Apakah saya akan kehilangan semua data saya dan aplikasi ?Tidak, Anda tidak akan. Namun, berdasarkan cara di mana OS terinstal, mungkin ada beberapa dampak pada data. Alasannya adalah bahwa komputer dengan Windows akan tetap bekerja seperti dulu bekerja bahkan setelah menginstal Ubuntu di atasnya .


2 . OK , tapi saya bisa mengakses drive Windows saya dari dalam Ubuntu ?Pengguna dapat terus mengakses Windows mereka drive dari dengan Ubuntu , terutama karena versi terbaru dari instalasi Linux memberikan Anda akses ke drive NTFS .


3 . Dapatkah saya menjalankan aplikasi Windows di Ubuntu ?Tidak Anda tidak bisa. Setidaknya tidak native . Namun, ada alternatif untuk sebagian besar aplikasi Windows di Ubuntu . Lebih penting lagi , sebagian besar dari ini tersedia secara gratis .


4 . Namun , saya bisa melakukan segala hal pada Ubuntu seperti yang saya lakukan pada Windows ?Ya, sebagian besar waktu Anda bisa. Meskipun Anda tidak dapat menjalankan aplikasi yang sama Anda akan perlu aplikasi baru untuk antarmuka . 

5 . OK, jadi Linux distro yang harus saya gunakan ?Yang ini toughie , mengingat fakta bahwa ada banyak distro Linux yang tersedia . Kebanyakan ahli teknologi menyarankan bahwa pengguna mendapatkan memahamkan " Ubuntu " pertama , mengingat bahwa itu adalah distro Linux paling populer . 
6 . Apa itu Ubuntu , Kubuntu , Linux , Mandriva , Fedora dll ?Pada dasarnya , Ubuntu , Kubuntu , Fedora dll semua memiliki Linux sebagai root mereka . Ini berarti bahwa mereka bekerja pada Linux tapi lingkungan desktop dan paket standar lainnya adalah berbeda untuk masing-masing dari mereka . 
7 . Dapatkah saya menjalankan Ubuntu pada PC lama saya , bukan?Ya siapapun bisa . Kebanyakan distro Linux dapat berjalan pada PC diberikan asalkan memiliki RAM 512MB dan 10 - 20GB hard disk ( bahkan kurang ) . 
8 . Bagaimana cara mendapatkan Ubuntu atau Linux dll ?Yang perlu Anda lakukan adalah pergi ke website masing-masing dan men-download gambar rilis ISO terbaru. Membakar sama pada DVD dan memulai proses instalasi . 
9 . Dapatkah saya masih menggunakan Windows?Yang perlu Anda lakukan adalah memilih dual boot ketika menginstal OS dan voila Anda bisa! 
10 . Baiklah saya mencoba Ubuntu , tapi bagaimana saya menyingkirkan itu sekarang ?Kami tidak akan menjawab yang satu ini , karena kami percaya bahwa sekali Anda sudah mencoba Linux , ada sedikit atau tidak ada kemungkinan bahwa Anda akan pernah kembali ke Windows ! Hahahha...Joke!

Everything You Wanted To Know About The Linux Kernel

Kernel Linux adalah bagian dari kode yang umum bagi semua versi dari Linux . Pemahaman yang tepat tentang kernel Linux memungkinkan Anda untuk memodifikasi sistem operasi ( OS ) sehingga dapat menggabungkan dukungan untuk fitur yang Anda inginkan . Setiap kernel Linux dilengkapi dengan fitur-fitur ini :

linux , kernel linux , kernel , sistem operasi , Multitasking , Linux OS , X Window System , LAN , GNU , API



Multiuser - Anda tidak bisa hanya memiliki beberapa account pengguna pada sistem Linux , tetapi juga dapat memiliki beberapa pengguna login dan bekerja pada sistem secara bersamaan . Selain itu, pengguna dapat mengatur lingkungan mereka sendiri dengan cara yang mereka inginkan . Hal ini dimungkinkan untuk memiliki account pengguna yang dilindungi sandi , sehingga pengguna dapat memantau siapa yang mendapat akses ke aplikasi dan data mereka .
Multitasking - Di Linux , adalah mungkin untuk memiliki beberapa program berjalan bersama-sama , yang berarti bahwa Anda tidak hanya dapat memiliki beberapa program yang berjalan bersama-sama , tetapi bahwa OS Linux dapat sendiri memiliki program yang berjalan di latar belakang . Mayoritas proses sistem ini membuatnya layak untuk Linux untuk bekerja sebagai server dengan berbagai latar belakang proses menanggapi jaringan untuk permintaan untuk masuk ke sistem anda , menampilkan halaman Internet , mencetak dokumen , atau menyalin file .
Antarmuka pengguna grafis ( X Window System ) - Kerangka yang kuat untuk bekerja dengan aplikasi grafis di Linux dijuluki sebagai Window System X ( atau hanya X ) . X mengelola fungsi membuka berbasis X antarmuka pengguna grafis ( GUI ) aplikasi dan menunjukkan mereka pada proses server X ( proses yang mengendalikan layar Anda , mouse , dan keyboard ) .
Hardware support - Hal ini dimungkinkan untuk mengatur dukungan untuk kira-kira setiap jenis hardware yang dapat dihubungkan ke pc . Anda bisa mendapatkan dukungan untuk floppy disk drive , CD - ROM , removable disk , kartu suara, kartu video, perangkat tape, dan banyak hal lain yang dapat Anda pikirkan .
Jaringan konektivitas - Linux menyediakan dukungan untuk berbagai kartu jaringan area lokal untuk menghubungkan sistem Linux ke jaringan , modem , dan perangkat serial. Selain itu , protokol LAN , termasuk Ethernet - baik kabel dan nirkabel , semua protokol jaringan tingkat atas yang paling dikagumi dapat diintegrasikan . TCP / IP adalah yang paling populer dari protokol ini adalah yang digunakan untuk menghubungkan ke Internet sementara protokol lainnya , seperti IPX dan X.25 juga tersedia .
Jaringan server - Linux menyediakan layanan jaringan terbaik untuk komputer klien pada LAN dan juga untuk seluruh Internet . Ia menawarkan berbagai paket perangkat lunak untuk memungkinkan Anda untuk menggunakan Linux sebagai server print , server file , server FTP, server mail , server Web , server berita , atau workgroup ( DHCP atau NIS ) Server .
Dukungan aplikasi - Karena kompatibilitas dengan POSIX dan berbagai antarmuka pemrograman aplikasi lainnya ( API ) , berbagai macam perangkat lunak freeware dan shareware yang tersedia untuk Linux . Sebagian besar perangkat lunak GNU dari Free Software Foundation akan berjalan di Linux .
Sumber : searchitchannel.techtarget.com

Hacking Tricks And Tutorials ( 8 Free eBooks )

Hacking Tricks And Tutorials ( 8 Free eBooks )
If you are someone who prefer to begin with practicals instead of mugging up theoretical lessons, then these ebooks are for you. These free guides shares tips and tricks that help you gain hands on experience on hacking.

hacking, hacking guides, hacking tutorials, hacking gmail, hacking ubuntu, Hacking Gps, Hacking Google Maps and Google Earth, Hacking Gmail, Hacking Blackberry Mobile Phone,




1. Hacking Ubuntu Linux

The introduction of the book says, "Ubuntu, an African word meaning “humanity to others,” is the hottest thing in Linux today. This down-and-dirty book shows you how they can blow away the default system settings and get Ubuntu to behave however you want. You’ll learn how to optimize its appearance, speed, usability, and security and get the low-down on hundreds of hacks such as running Ubuntu from a USB drive, installing it on a Mac, enabling multiple CPUs, and putting scripts in menus and panels."

2. Hacking Gps

The book carries Crazy-cool modifications include exploiting secret keycodes, revealing hidden features, building power cords and cables, hacking the battery and antenna, protecting a GPS from impact and falls, making a screen protector, and solar-powering a GPS. It is a user manual that shows the reader how to modify, tweak, and hack their GPS to take it to new levels!

3. Hacking Google Maps and Google Earth

The introduction of the book says, "This one-of-a-kind resource contains 500 pages of jaw-dropping hacks, mods, and customizations. These include creating mashups with data from other sources such as Flickr, building a space station tracker, hacking Maps with Firefox PiggyBank, and building a complete community site with Maps and Earth. Now you can map out locations, get driving directions, zoom into any point on the globe, display real time traffic, and much more."

4. Hacking Gmail

According to its introduction, the book unlocks the true power behind Gmail, Hacking Gmail will immediately appeal to Google and Gmail fans, serious, down-and-dirty, under-the-hood, code-level hacking that will have readers eliminating the default settings, customizing appearance, disabling advertising, and taking control over their Gmail accounts. Carries some amazing tricks like how to check their Gmail without visiting the site; use Gmail APIs in Perl, Python, PHP, and other languages, or create their own; and maximize Gmail as a host for message boards, photo galleries, even a blog.

5. Hacking Blackberry

The introduction of the books says, "Admit it. You're addicted to your BlackBerry. That's okay. Most users are, and this book is just going to make it worse. Now you'll discover how to use your BlackBerry to retrieve documents, weather forecasts, and Web information; use it as a word processor or drawing tool; even control your computer over a network with it. And we haven't even gotten to the way-out stuff. Tweaks, tricks, and add-on apps to customize your BlackBerry--plus Java code for even cooler hacks."

6. Hacking Windows XP

The introduction of the books says, "Over 200 serious hacks readers can use to force Windows XP to do it their way, written in the ExtremeTech no-holds-barred style. This book is written for users who aren't afraid to roll up their sleeves, risk voiding their warranties, take total control of the task bar, uninstall programs that are supposedly permanent, and beef up boot speed."

7. Secrets of Super Hacker

Secrets of Super Hacker is the most amazing book ever published on computer hacking. Step by step illustrated details on the techniques used by hackers to get your data including Guessing Passwords, Stealing Passwords, Password Lists, Social Engineering, Reverse Social Engineering, Crashing Electronic Bulletin Boards, Dummy Screens, Fake E-mail, Trojan Horses, Viruses, Worms,Trap Doors, And Much more. Anyone concerned with computer security and data privacy needs to read this book.

Note: password for the rar file is tricks4u.

8. 1000+ Hacking Tutorials collection

1000+ hacking tutorials which includes all the stuffs of hacking, cracking and tips its most useful includes hacking tricks and tips, e-books of hacking, Phreaking and much more.

Linux Mint Problem Update (medibuntu)

Linux Mint Problem Update (medibuntu)
Sudo apt-get update

Failed to fetch http://packages.medibuntu.org/dists/precise/Release.gpg  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/free/binary-amd64/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/binary-amd64/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/free/binary-i386/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/binary-i386/Packages  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/free/i18n/Translation-en_US  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/free/i18n/Translation-en  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/i18n/Translation-en_US  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Failed to fetch http://packages.medibuntu.org/dists/precise/non-free/i18n/Translation-en  Something wicked happened resolving 'packages.medibuntu.org:http' (-5 - No address associated with hostname)
Some index files failed to download. They have been ignored, or old ones used instead.


Jika proses update anda terjadi seperti diatas...

Hal tersebut terjadi karena medibuntu sudah menghentikan support nya, sehingga ketika proses pencarian domain medibuntu terjadi error.


untuk menyelesaikan proses update tersebut hanya perlu menghilangkan support dari medibuntu pada Sistem operasi kita,

sudo pico /etc/apt/sources.list

Berikan tanda pagar seperti terlihat seperti dibawah

deb http://packages.linuxmint.com/ maya main upstream import
deb http://archive.ubuntu.com/ubuntu/ precise main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ precise-updates main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu/ precise-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu/ precise partner
#deb http://packages.medibuntu.org/ precise free non-free

# deb http://archive.getdeb.net/ubuntu precise-getdeb apps
# deb http://archive.getdeb.net/ubuntu precise-getdeb games
Jalankan kembali update :

sudo apt-get update

Finish.

Posting by Medibuntu
Medibuntu is going down.

The project is not really needed nowadays, except for one package: libdvdcss. This package is now maintained by Jonathan Riddell at Blue Systems. It is available in a repository hosted by VideoLAN.

To disable the Medibuntu repository and enable the libdvdcss one, use these commands:
sudo rm /etc/apt/sources.list.d/medibuntu.list
curl ftp://ftp.videolan.org/pub/debian/videolan-apt.asc | sudo apt-key add -
echo "deb ftp://ftp.videolan.org/pub/debian/stable ./" | sudo tee /etc/apt/sources.list.d/libdvdcss.list
sudo apt-get update

 If you are using Ubuntu saucy, you can also install libdvdcss using an alternative method (make sure to install/upgrade the libdvdread4 package first).

I'll keep the repository online for now, at least until the Ubuntu 13.10 release. Expect the repository to be down after that. An iso image of the current state of the repository is available.

I recommend to disable the repository if you are currently using it.

Thanks to all the persons who contributed to the project (package maintainers, servers admins, ...).