Debian/Ubuntu Tips and Tricks

Debuntu

Debian/Ubuntu Tips and Tricks

Archive for the 'Networking' Category

How Tos related to networking from accessing remote hosts, configuring a service or administration.

How-To: Prevent SPAM with Apache’s mod security

Posted by chantra on 6th November 2014

WordPress is a great piece of software to run a blog, it is flexible, has tons of plugins are developed for it and updates are really easy to do. To fight spam comments, there is already the Akismet plugin that does a really good job.
While Akismet catches the spam comments and put them in a separate location, making it easy to delete them, as the number of spam grows, WordPress can take long to empty the purge the flush comments and the best option becomes to use a manual SQL query to flush them.
In this article, we will see how we can use RBL to prevent spammer from posting to WordPress's comment page and at the same time, lift a bit of load from the server.
While the rules work for WordPress, with a bit of modifications, it will be easy to get this setup working for any kind of blog/website.

Read the rest of this entry »

Tags: , ,
Posted in Administration, HowTo, HTTP, Networking, System | No Comments »

How-To: Fight SPAM with Postfix RBL

Posted by chantra on 26th September 2013

Spam, spam everywhere! If you are hosting your own mail server, fighting spam can become tricky. Antispam solutions do catch a fair amount of them, but still many spam email can still make their way through.

RBL (Real-time Blackhole) is a database of known spammy IPs which is accessible over DNS. Depending on the response received from the DNS server, the IP is classified as spammy or not.

This tutorial will show you how to set up RBL with postfix.

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, Networking, System | 1 Comment »

How-To: WiFi roaming with wpa-supplicant

Posted by chantra on 18th June 2013

wpa_supplicant can be used as a roaming daemon so you can get your system to automatically connect to different network as you are going from one location to another.

This come in pretty handy on headless machines where you rely on network connection to be up in order to be able to access the machine.

Read the rest of this entry »

Tags: ,
Posted in Administration, HowTo, Networking | No Comments »

How-To: find which program consumes your bandwidth with nethogs

Posted by chantra on 29th March 2013

Let's continue the network monitoring serie with yet another use case.... the "What program is using my bandwidth?" problem while not imposible to solve, still remains a pain. What if there were some kind of top for network?

NetHogs is a nifty tool that will do that for you and will help you finding what is hogging your connection.

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, Networking | No Comments »

How-To: monitor network bandwidth usage with vnstat

Posted by chantra on 11th March 2013

There is many tools out there that help in monitoring network usage, collect statistics and generate graphs so we can view what happened at a given date/time. Anyhow, finding the bandwidth usage over an hour/day/week/month can be really tricky.

vnstat is a suite of daemon and client programs that monitor network bandwidth usage.

Read the rest of this entry »

Tags: , , ,
Posted in Administration, HowTo, Networking | No Comments »

How-To: OpenVPN on Debian Squeeze with Username/Password authentication

Posted by chantra on 16th January 2013

OpenVPN is a SSL based VPN software that runs on most OS. It is simple to install and run.

In this tutorial, I will go over the steps needed to configure OpenVPN on Debian Squeeze to provide a full VPN tunnel, this is particularly useful when you want to access internet from non-trusted networks such as free hotspots...

There are many ways of setting up OpenVPN, a common one is to use a unique certificate for each users. Another one is to have each user authenticate with a username/password.

In this article, we will be setting OpenVPN to authenticate users using PAM.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, Softwares, System | No Comments »

How-To: Set up a L2TP over IPSec VPN using a Radius backend — page 3

Posted by chantra on 18th June 2010

This entry is part 3 of 3 in the series How-To: Set up a L2TP over IPSec VPN using a Radius backend

Using freeradius for authentication

Here I am going to consider that the freeradius server is set up correctly, meaning that you can already authenticate your users with freeradius using radtest utility.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | No Comments »

How-To: Set up a L2TP over IPSec VPN using a Radius backend — page 2

Posted by chantra on 18th June 2010

This entry is part 1 of 3 in the series How-To: Set up a L2TP over IPSec VPN using a Radius backend

XL2TP

Now, let's get on the next phase: XL2TP.

Packages Requirements

You can install xl2tp with the following command:

# apt-get install xl2tp

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | 1 Comment »

How-To: Set up a L2TP over IPSec VPN using a Radius backend

Posted by chantra on 18th June 2010

This entry is part 1 of 3 in the series How-To: Set up a L2TP over IPSec VPN using a Radius backend

Even though I pretty like OpenVPN, there is still some devices that might not support the TUN/TAP driver needed by OpenVPN.

Take IPhones, Android phones for instance, you need to root them in order to get that feature, assuming somebody has already cooked a ROM for your device.

L2TP is quite and old standard that allow setting up VPNs.

On the other end, it does not provide any kind of encryption mechanism, and as such, it is pretty common to get L2TP running over an IPSec link.

Read the rest of this entry »

Tags: , , , ,
Posted in Administration, HowTo, Networking, System | 1 Comment »

How-To: Network-Manager-OpenVPN overwrites default route

Posted by chantra on 2nd March 2010

I was trying network-manager-openvpn plugin today on Lucid, I could import my configuration, DNS was set up correctly upon connection/disconnection, route imported correctly (almost :)).

One issue though is that it was also changing the default route to the VPN tunnel while this should not happen.

Read the rest of this entry »

Tags: ,
Posted in HowTo, Networking | No Comments »