Showing posts with label step. Show all posts
Showing posts with label step. Show all posts
Monday, September 18, 2017
Ubiquiti Aircontrol 2 Server Ubuntu Install Step by step
Ubiquiti Aircontrol 2 Server Ubuntu Install Step by step

The new version of Aircontrol may still be in beta, but it as vast improvement over the original Aircontrol. One of the best features of the software is the fact that it runs natively on linux. Here is a step by step tutorial on getting it running on Ubuntu:
1. Log in to your Ubuntu server and switch to a root user.
2. Update your apt-get resources:
apt-get update
3. Download the Aircontrol 2 Beta *.deb file. You should register on the Ubiquiti beta forums to make sure you get the latest version.:
wget http://www.ubnt.com/downloads/aircontrol2/aircontrol-v2.0-Beta14.1129.150619.1740-ubuntu.deb
3.Install the *.deb file using dpkg:
dpkg -i aircontrol-v2.0-Beta14.1129.150619.1740-ubuntu.deb
4. Run apt-get to fix missing dependencies
apt-get install -f
5. On the "Installation Type" screen, select "Server" and select "OK"

6. Configure a Username

7. Configure a Password

8. Set the port (I leave it as is)

9. Configure the service to start automatically

10. Verify that Aircontrol 2 is running by navigating to http://server-ip:9081
You should see a message saying: Welcome to Ubiquit Aircontrol 2
Thats it. You should now be able to connect using the Aircontrol Client on your PC!
download file now
Wednesday, September 13, 2017
Ubuntu 14 04 LTS FreeRadius Postgresql Step by step
Ubuntu 14 04 LTS FreeRadius Postgresql Step by step
Step by step instructions for installing
FreeRadius with Postgresql on
Ubuntu 14.04 LTS

Why 14.04, well it is the current LTS release, and for production environments, I tend to stick to the latest LTS.
I am not going to be going into detail into how to install Ubuntu 14.04 Server, there are enough tutorials on that elsewhere. I need you to get to the point where you have a clean server, with SSH access, and a root prompt.
Installing software
First, let us update the apt-get info:
apt-get update
Now we need to install the basic components, these include:
Freeradius, Postgresql and its utilities as well as the postgresql module for freeradius:
apt-get install freeradius freeradius-postgresql postgresql postgresql-contrib
This will install all the necessary components, it is normal for the DH Parameter generation to take a couple of minutes.
Configure Postgres
The Postgres installation automatically creates a user called postgres, in order to configure Postgres, you need to log into that account.sudo -i -u postgres
Now we create the radius user and database, when creating the user, you will be prompted to create a password, make it nice and secure, and make a note for later use:
createuser radius --no-superuser --no-createdb --no-createrole -P
createdb radius --owner=radius exit
createdb radius --owner=radius exit
Change the database authentication from peer to md5 to allow login from the console:
vim /etc/postgresql/9.3/main/pg_hba.conf
Find the line that matches:
local all postgres peer
and change it to:
local all postgres md5
also find:
local all peer
and change it to:
local all md5
Reload postgresql
service postgresql restart
Import the database schema using the command below:
cd /etc/freeradius/sql/postgresql
psql -U radius radius < schema.sql
psql -U radius radius < schema.sql
Configure FreeRadius to use Postgres
Change the sql configuration as follows:
cd /etc/freeradius
vim sql.conf
vim sql.conf
change the following lines to suit your setup:
database = "postgresql"
password = "yourpassword"
password = "yourpassword"
You will also need to change the login name to leave out the realm when logging in:
Change the sql configuration as follows:
vim radiusd.conf
change the following line:
sql_user_name = "%{User-Name}"
To: sql_user_name = "%{Stripped-User-Name}"
Also uncomment the line that reads: $INCLUDE sql.conf
Now uncomment the line that reads "sql" under the authorize{} section, on my default config it is line 177,
also uncomment the "sql" line under the accounting{} section,
also uncomment the "sql" line under the post-auth{} section
also uncomment the "sql" line under the accounting{} section,
also uncomment the "sql" line under the post-auth{} section
cd /etc/freeradius/sites-availablevim default
Also uncomment the line that reads "sql" under the authorize{} section of /etc/freeradius/sites-available/inner-tunnel, on my default config it is line 131
vim inner-tunnel
Restart the FreeRadius server to load the new config, and you should be good to go.
service freeradius restart
download file now
Labels:
04,
14,
by,
freeradius,
lts,
postgresql,
step,
ubuntu
Tuesday, September 12, 2017
Ultimate Seedbox Tutorial Step By Step
Ultimate Seedbox Tutorial Step By Step
Setting up your own seedbox from scratch, step by step tutorial.
While Ubuntu may not be the most lightweight Linux distro available, ti does make things very easy. I will be using Ubuntu 14.04 Server. I developed this tutorial using VirtualBox, but if you have a spare laptop or old pc, that will work just as well.
I will show you how to install Ubuntu 14.04 server, install the latest version of Deluge, including the daemon and web interface, as well as set up a basic FTP server and Samba share to access your downloads.
Skip to Part 2 - Installing Software
Skip to Part 3 - Using Deluge
Part 1 - Installing Ubuntu
First you will need to download Ubuntu,
You can get the latest version here. Make sure you get the right version for your hardware.
You can burn it to a CD or install from USB using LinuxLiveUsb creator.
Once you have the machine booting from your installation media, follow the steps below to install Ubuntu.
Step 1
You will be greeted with an installer language selection. I speak English, so that is what I will be using.

Step 2
Its not rocket science, just select "Install Ubuntu Server" and press enter.

Step 3
You get to pick your language again for some reason.

Step 4
Select your location.

Step 5
Trust me its faster to select your keyboard layout rather than letting Ubuntu try to detect it.

Step 4
In fact, based on your language choice it will probably already be selected

Step 5
English (US), not surprises here.

Step 6
I bet you can come up with a more creative name for your server than I did.

Step 7
To keep things simple, I am using "seedbox" as my username and password. This is not secure, also I dont care if this is secure, you might though. I would suggest that you stick with "seedbox" as the username and choose your own password.





Step 8
I dont care if it is not secure, I save my private pictures on iCloud anyways.

Step 9
You can let Ubuntu try to figure out the time, it has never failed me.

Step 9
Setting up the partitions can be intimidating, why not let Ubuntu do it for you. I usually just go for "Guided - use entire disk". you may have a reason to do it differently.



Step 10
I dont use a proxy, in fact if you want to run a seedbox through a proxy then good luck to you.

Step 11
You may elect different, but I am okay with security updates.

Step 12
I just select OpenSSH at this point, since I will be installing what I need later on.

Step 13
Finish out the installation and let the computer reboot.

Part 2 - Setting up the software
Log in with the username and password we configured while installing.
Switch to a root user, since everything that we need to do needs to be done as root
Run the following command
You will now be able to connect using Putty, which is easier since you will be able to copy and paste the commands straight into the Putty window.
Now let us install the Deluge Daemon, Deluge Console as well as the Deluge Web Interface
Next we want to create the user that Deluge will run under, we also want to add our default "seedbox" user to the "deluge" group so that we have access to the downloaded files.
In order to enable logging, which is invaluable in terms of troubleshooting, run the following on the command line:Username: seedbox
Password: seedbox
Password: seedbox
Switch to a root user, since everything that we need to do needs to be done as root
sudo -s
Setting your IP Address
While you can use DHCP to assign the servers IP Address, I find it much more useful to use a static IP. It will allow me to set up port forwarding on my router and also I will always know what IP to use when connecting with Putty or another SSH Client.
Use your favourite editor to open /etc/networking/interfaces
vim /etc/networking/interfaces
Change it to match the following, obviously you should change it to match your network configuration:
# The primary network interface
auto eth0
iface eth0 inet static
address 10.0.0.5
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8
auto eth0
iface eth0 inet static
address 10.0.0.5
netmask 255.255.255.0
gateway 10.0.0.1
dns-nameservers 8.8.8.8
Run the following command
/etc/init.d/networking restart
You will now be able to connect using Putty, which is easier since you will be able to copy and paste the commands straight into the Putty window.
Installing and configuring Deluge
First we need to add the Deluge Repository so that get the latest version of Delugeadd-apt-repository ppa:deluge-team/ppa
apt-get update
apt-get update
Now let us install the Deluge Daemon, Deluge Console as well as the Deluge Web Interface
apt-get install deluged deluge-web deluge-console
Next we want to create the user that Deluge will run under, we also want to add our default "seedbox" user to the "deluge" group so that we have access to the downloaded files.
adduser --system --group --home /var/lib/deluge deluge
You also want to add the "seedbox" user to the "deluge" group to ensure that you can access the downloaded files.sudo adduser seedbox deluge
sudo mkdir -p /var/log/deluge
sudo chown -R deluge:deluge /var/log/deluge
sudo chmod -R 750 /var/log/deluge
sudo chown -R deluge:deluge /var/log/deluge
sudo chmod -R 750 /var/log/deluge
Now, open up your favorite text editor and put the following in /etc/init/deluged.conf. This is the upstart script to run the Deluge Deamon, and was taken from the Deluge documentation.
# deluged - Deluge daemon
#
# The daemon component of Deluge BitTorrent client. Deluge UI clients
# connect to this daemon via DelugeRPC protocol.
description "Deluge daemon"
author "Deluge Team"
start on filesystem and static-network-up
stop on runlevel [016]
respawn
respawn limit 5 30
env uid=deluge
env gid=deluge
env umask=007
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning
#
# The daemon component of Deluge BitTorrent client. Deluge UI clients
# connect to this daemon via DelugeRPC protocol.
description "Deluge daemon"
author "Deluge Team"
start on filesystem and static-network-up
stop on runlevel [016]
respawn
respawn limit 5 30
env uid=deluge
env gid=deluge
env umask=007
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluged -- -d -l /var/log/deluge/daemon.log -L warning
Do the same for the Web Interface startup script in /etc/init/deluge-web.conf
# deluge-web - Deluge Web UI
#
# The Web UI component of Deluge BitTorrent client, connects to deluged and
# provides a web application interface for users. Default url: http://localhost:8112
description "Deluge Web UI"
author "Deluge Team"
start on started deluged
stop on stopping deluged
respawn
respawn limit 5 30
env uid=deluge
env gid=deluge
env umask=027
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web -- -l /var/log/deluge/web.log -L warning
#
# The Web UI component of Deluge BitTorrent client, connects to deluged and
# provides a web application interface for users. Default url: http://localhost:8112
description "Deluge Web UI"
author "Deluge Team"
start on started deluged
stop on stopping deluged
respawn
respawn limit 5 30
env uid=deluge
env gid=deluge
env umask=027
exec start-stop-daemon -S -c $uid:$gid -k $umask -x /usr/bin/deluge-web -- -l /var/log/deluge/web.log -L warning
Now, create a remote user with the following command:
echo "seedbox:seedboxpassword:10">>/var/lib/deluge/.config/deluge/auth
This creates a user with the name "seedbox" and password "seedboxpassword"
Lastly, we need to enable remote access:
Lastly, we need to enable remote access:
Stop the running deamon, this will cause it to write the current config into /var/lib/deluge/.config/deluge/core.conf:
service deluged stop
Edit the main config file located in /var/lib/deluge/.config/deluge/core.conf. You need to find the line that looks like this:
"allow_remote": false,
And change it to read:"allow_remote": true,
Restart the Deluge daemon:service deluged start
Installing and configuring FTP
If you want to be able to access your downloads via FTP, please follow the steps below.Install vsftpd
apt-get install vsftpd
Using Symlinks you can make a shortcut in your home directory pointing to the Deluge download folder:ln -s /var/lib/deluge/ /home/seedbox/deluge
That is all you need to do to get FTP up and running.
Using an FTP client you can now connect with the "seedbox" user and password, and it show a shortcut to the deluge folder where all your downloads will end up:

Installing and configuring Samba
If you want to be able to access your downloads directly with your Windows PC, you will need to install sambaInstall Samba
apt-get install samba
Run smbpasswd to create a samba login for your "seedbox" usersmbpasswd -a seedbox
Next you want to edit the samba config in /etc/samba/smb.conf, but lets start by making a backup of the default config:cp /etc/samba/smb.conf /etc/samba/smb.bak
Then add the following right at the end of /etc/samba/smb.conf
[deluge]
path = /var/lib/deluge/
available = yes
valid users = seedbox
read only = no
browseable = yes
public = yes
writable = yes
path = /var/lib/deluge/
available = yes
valid users = seedbox
read only = no
browseable = yes
public = yes
writable = yes
Now, if you point a Windows Explorer to <seedbox ip> you can login using the username and password used above with smbpasswd:

Part 3 - Using Deluge
You will have two ways of managing your seedbox. The first method is by logging in to the web interface.Using the web interface
Point your web browser to:http://<seedbox ip>:8112
You will be greeted by the Deluge Login screen:

On first login you will be prompted to change your password. My advice is that you do it.

Select the local server and click "Connect":

Change the password:

While we have the settings open, go to the Daemon category and make sure "Allow Remote Connections" is enabled.

Using the Daemon
This is in my opinion the best feature of Deluge.You can install the Deluge client on your PC, and use that to manage your seedbox. That means you dont need to upload torrents using the web interface. You can simply open them on the client on your computer, and they will automatically be added to the server.
I assume you know how to install Windows applications, so I will walk through from the point where you run the Deluge client for the first time.
To get access to the connection manager you need to switch off classic mode, to do this, open up the Preferences window, and go to the "Interface" tab.

Under Classic Mode, deselect "enable" and click apply.

You will be prompted to restart Deluge, click yes.

After restarting you will have access to the connection manager.

Click on Add

Enter the login details we created earlier, along with the correct IP for your seedbox.
Username: seedbox
Password: seedboxpassword

If you did everything correctly, you will now be able to connect to the server and start seeding!

download file now
Monday, August 21, 2017
Ubiquiti AirOS 5 6 Virtual SSID Step by Step
Ubiquiti AirOS 5 6 Virtual SSID Step by Step

One of the big gripes that people have with Ubiquiti is the lack of support for Virtual SSIDs. Here is a step by step tutorial for setting up VSSIDs on Airos 5.6 devices with Vlans back to the upstream router. Please note that you will not be able to use Airmax when you have Virtual SSIDs.
This tutorial is based on information from the Ubiquiti Forums, specifically this post by AnubisSL.
Step 1 - Make sure you are running the latest version of AirOS
Step 2 - Configure the first SSID as you would under normal circumstances
Step 3 - Download the config file from the device and open it using a text editor
Step 4 - Edit the config file
4.1a - Without VLAN use this if you dont need to vlan the second SSID
Under the "bridge" section, create a new bridge port. The port number, "3" in this example should be incremented by one from the previous highest number. The devname, in this case "ath1" is also one more than the previous, in this case "ath0"
Under the "bridge" section, create a new bridge port. The port number, "3" in this example should be incremented by one from the previous highest number. The devname, in this case "ath1" is also one more than the previous, in this case "ath0"
bridge.1.port.3.devname=ath1
bridge.1.port.3.prio=20
bridge.1.port.3.status=enabled
bridge.1.port.3.prio=20
bridge.1.port.3.status=enabled
4.1b - With VLAN use this if you want to place the clients on the second SSID in a VLAN
Under the "bridge" section, create a new bridge, incrementing the last used by one. Add the ethernet interface, as well as the new (virtual) wireless interface (created later on). The ethernet device name is noted as eth0.vlanid (in this case vlan10).
The device name for bridge.2 would be br1 for bridge.3 it would be br2 and so on.
bridge.2.comment=Management
bridge.2.devname=br1
bridge.2.port.1.devname=eth0.10
bridge.2.port.1.status=enabled
bridge.2.port.2.devname=ath1
bridge.2.port.2.status=enabled
bridge.2.status=enabled
bridge.2.stp.status=disabled
bridge.2.devname=br1
bridge.2.port.1.devname=eth0.10
bridge.2.port.1.status=enabled
bridge.2.port.2.devname=ath1
bridge.2.port.2.status=enabled
bridge.2.status=enabled
bridge.2.stp.status=disabled
4.2 Under the "ebtables" section, add the new device, incrementing the number "2" as appropriate, and using the device name created above.
Without VLAN
Without VLAN
ebtables.sys.eap.2.status=enabled
ebtables.sys.eap.2.devname=ath1
ebtables.sys.arpnat.2.status=enabled
ebtables.sys.arpnat.2.devname=ath1
ebtables.sys.eap.2.devname=ath1
ebtables.sys.arpnat.2.status=enabled
ebtables.sys.arpnat.2.devname=ath1
With VLAN (note, you can also create the VLAN using the web interface)
ebtables.sys.eap.2.status=enabled
ebtables.sys.eap.2.devname=ath1
ebtables.sys.arpnat.2.status=enabled
ebtables.sys.arpnat.2.devname=ath1
ebtables.sys.vlan.1.comment=VirtualSSID
ebtables.sys.vlan.1.devname=eth0
ebtables.sys.vlan.1.id=10
ebtables.sys.vlan.1.status=enabled
ebtables.sys.vlan.status=enabled
ebtables.sys.eap.2.devname=ath1
ebtables.sys.arpnat.2.status=enabled
ebtables.sys.arpnat.2.devname=ath1
ebtables.sys.vlan.1.comment=VirtualSSID
ebtables.sys.vlan.1.devname=eth0
ebtables.sys.vlan.1.id=10
ebtables.sys.vlan.1.status=enabled
ebtables.sys.vlan.status=enabled
4.3 Under the "netconf" section add the information below incrementing "4" as needed. make sure you use the same device name as above
netconf.4.up=enabled
netconf.4.status=enabled
netconf.4.role=bridge_port
netconf.4.promisc=enabled
netconf.4.netmask=255.255.255.0
netconf.4.mtu=1500
netconf.4.ip=0.0.0.0
netconf.4.hwaddr.status=disabled
netconf.4.hwaddr.mac=
netconf.4.devname=ath1
netconf.4.autoip.status=disabled
netconf.4.allmulti=enabled
netconf.4.status=enabled
netconf.4.role=bridge_port
netconf.4.promisc=enabled
netconf.4.netmask=255.255.255.0
netconf.4.mtu=1500
netconf.4.ip=0.0.0.0
netconf.4.hwaddr.status=disabled
netconf.4.hwaddr.mac=
netconf.4.devname=ath1
netconf.4.autoip.status=disabled
netconf.4.allmulti=enabled
4.4 Add the following under the "radio" section, specifying radio.1 as the parent device, and incrementing the virtual device number as needed
radio.1.virtual.1.status=enabled
radio.1.virtual.1.devname=ath1
radio.1.virtual.1.mode=master
radio.1.virtual.1.devname=ath1
radio.1.virtual.1.mode=master
4.5 Add the following under the "wireless" section, using the next available number, and choose a sensible SSID name
wireless.2.wmm=enabled
wireless.2.wds.status=disabled
wireless.2.status=enabled
wireless.2.ssid=NEWSSID <= CHANGE TO ACTUAL SSID OF VIRTUAL AP
wireless.2.l2_isolation=enabled <= CHANGE TO disabled IF NO ISOLATION IS REQUIRED
wireless.2.hide_ssid=disabled
wireless.2.autowds=disabled
wireless.2.authmode=1
wireless.2.ap=
wireless.2.addmtikie=enabled
wireless.2.devname=ath1
wireless.2.wds.status=disabled
wireless.2.status=enabled
wireless.2.ssid=NEWSSID <= CHANGE TO ACTUAL SSID OF VIRTUAL AP
wireless.2.l2_isolation=enabled <= CHANGE TO disabled IF NO ISOLATION IS REQUIRED
wireless.2.hide_ssid=disabled
wireless.2.autowds=disabled
wireless.2.authmode=1
wireless.2.ap=
wireless.2.addmtikie=enabled
wireless.2.devname=ath1
4.6 Unless you need security, you can save the file and upload it to your device. That is all.
4.6 If you want to enable security, add the following under the "aaa" section, changing the values appropriately
aaa.2.devname=ath1 <= CHANGE TO ACTUAL DEVICE OF VIRTUAL AP
aaa.2.driver=madwifi
aaa.2.radius.auth.1.status=disabled
aaa.2.ssid=NEWSSID <= CHANGE TO ACTUAL SSID OF VIRTUAL AP
aaa.2.status=enabled
aaa.2.wpa.1.pairwise=TKIP CCMP
aaa.2.wpa.key.1.mgmt=WPA-PSK
aaa.2.wpa.psk=PASSWORD <= CHANGE TO REQUIRED PASSWORD OF VIRTUAL AP
aaa.2.wpa.mode=2
aaa.2.driver=madwifi
aaa.2.radius.auth.1.status=disabled
aaa.2.ssid=NEWSSID <= CHANGE TO ACTUAL SSID OF VIRTUAL AP
aaa.2.status=enabled
aaa.2.wpa.1.pairwise=TKIP CCMP
aaa.2.wpa.key.1.mgmt=WPA-PSK
aaa.2.wpa.psk=PASSWORD <= CHANGE TO REQUIRED PASSWORD OF VIRTUAL AP
aaa.2.wpa.mode=2
Thats it, you can now upload the new config, and reboot the device!
Limitations:
NO AIRMAX!
NO 10MHZ channels
i think thats it
download file now
Subscribe to:
Posts (Atom)