LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 09-04-2009, 05:12 AM   #1
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Rep: Reputation: 0
Question Internet Quota for ADSL using Linux


Hi,
I am a beginner with Linux and am wondering how to set up internet quota for my home ADSL. There are 8 users using the internet and I would like to be able to restrict their internet usage (by creating usernames with corresponding passwords and individual internet download quota per month for each person). I have been looking around and it looks like the best way to do it is to run/install Linux on a computer as an internet gateway, then use another program (preferable free) to set up the internet quota system.

If possible, each user should be able to see their usage status through their browser and have the option to change their password if they want.

The overall idea is that the ADSL modem will be pugged into the 'Linux gateway', and then from the Linux gateway to the internet plug on my router. Each computer will be able to connect to the router and access the network and also internet. Except this time they will be restricted on their internet usage.

Does anyone have any ideas, "Beginner" (and easy to understand) tutorials or ways to do this.

Thanks,
James
 
Old 09-05-2009, 08:43 AM   #2
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
IPCop (1.4.21) with the Traffic Control & Report (TCAR) addon will do the job. Google IPCop for details.

Last edited by mickza; 09-05-2009 at 08:45 AM.
 
Old 09-05-2009, 10:53 PM   #3
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks Mickza, you've helped me make a huge step in my progress in this project.

Now, which Linux would be best for this setup (remembering that I am a beginner to Linux and really have no experience)?
Also, is there a process that I need to go though to setup up Linux so that is it can operate as an internet gateway with IPcop and the TCAR addon? I fyou know of any websites or tutorials for beginners that would be great.

Thanks again,
James
 
Old 09-06-2009, 06:37 AM   #4
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
IPCop is a "Linux" so no other distro is required.

Start by downloading and burning the IPCop 1.4.20 install cd from:

http://sourceforge.net/projects/ipco...6.iso/download

I recommend a minimum of a PIII/500Mhz CPU with at least 256Mb memory & 10Gb HDD for your proposed setup, a monitor & keyboard will be required for the initial installation. Try to choose a quiet box as you will be living with it 24/7.

Important - IPCop will overwrite ALL existing data on the hard disk.

Read & understand the following for a overview of the installation process and have the required setup info to hand before you start. You will be using a RED GREEN network setup:

http://articles.techrepublic.com.com...1-5175157.html

Come back when you are ready for the 1.4.21 update & TCAR install.
 
Old 09-11-2009, 05:59 PM   #5
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
I have now installed IPcop. I can connect to green with my computer. I can also access the web GUI. However I can't get any internet.
I think I may be missing something or have not set something up right.
Have you got any ideas?

Thanks,
James

Last edited by jameske; 09-12-2009 at 01:40 AM.
 
Old 09-12-2009, 06:24 AM   #6
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
See attached examples of a ADSL setup with a variable ISP assigned IP address - not Static, note that your modem must be in Bridged mode for this example to work (supply modem type & model if you need help).

Use IPCop GUI>NETWORK>Dialup to create, save & select profiles (ISP setups).

Use IPCop GUI>SYSTEM>Home to connect & disconnect.

Use IPCop GUI>LOGS>System Logs for info on what's happening when you try to connect.

If needed you can change the RED address settings by ssh'ing (PuTTY on Windows) using port 222 into your IPCop box as user root and running setup from the command line.

To keep your appetite whetted check out http://update-accelerator.advproxy.net/ - another must have add-on when you are up and running.
Attached Images
File Type: png RED_address_setting.png (35.5 KB, 22 views)
File Type: png Network_Dialup_config.png (107.6 KB, 20 views)

Last edited by mickza; 09-12-2009 at 06:32 AM.
 
Old 09-18-2009, 10:11 AM   #7
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
I don't know how or where to plug in the green interface of IPcop to my router (Netgear, Wireless, 4 LAN ports and one Internet/Modem port). Do I plug green into the Internet/Modem port or one of the LAN ports? I have tried putting it in the Internet/Modem port but then I can't access the GUI via my web browser.

I have an ADSL modem router of the brand 'BILLION', model: BiPAC 7300RA. I'm not too sure of how to set it in 'bridged mode'.

Thanks again
 
Old 09-20-2009, 09:07 AM   #8
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
Here is the link for the Billion modem http://support.billion.com/_Internet...ser_Manual.pdf see page 55.

Using the Billion as a bridge modem is a waste though, rather sell it & replace with a DLink DSL-2500U ADSL2 modem & DES-1008 8 port switch (or similar products) for about the same money.

The green interface should plug into a LAN port on the Netgear - check that the Netgear DHCP Server is disabled.
 
Old 09-25-2009, 09:39 PM   #9
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Ok, thanks mickza for your last post which has helped me get my system runnning. I now have it running smoothly. I'm ready for the TCAR addon, so when your ready fire away!

Thanks again, James

Last edited by jameske; 09-25-2009 at 09:54 PM.
 
Old 10-04-2009, 09:55 AM   #10
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
Sorry for the delay, here's part 1 - installing TCAR.

On your windows pc perform the following:

Download addons-2.3-CLI-b2.tar.gz from:
http://firewalladdons.sourceforge.net/

Download TrafficControlAndReport-1.1-GUI-b2.tar.gz from:
http://www.onmind.ru/tcar/tcaren.htm

Download sendEmail-v1.54.tar.gz (not v1.56) from:
http://caspian.dotconf.net/menu/Software/SendEmail

Install WinSCP: http://sourceforge.net/projects/wins...p.exe/download
Install with the Explorer interface option

Download PuTTY to your Desktop: http://www.softpedia.com/progDownloa...load-1001.html

From a browser enable SSH access on the IPCop GUI HOME>SSH Access

Start WinSCP using the ipcop IP (port 222 not 22) user root and the password you defined for root when you set IPCop up
Expand the / folder
Select the tmp folder
Copy & paste the .gz files you downloaded into the tmp folder (paste is under the File tab on WinSCP)

Using Putty login to the ipcop IP (port 222) as root and the password previously mentioned.

Check the .gz files have copied correctly:
Code:
root@ipcop: ls /tmp
addons-2.3-CLI-b2.tar.gz sendEmail-v1.54.tar.gz TrafficControlAndReport-1.1-GUI-b2.tar.gz
Installing the addon server:
Code:
root@ipcop: tar -zxvf /tmp/addons*.gz -C /tmp/
root@ipcop: /tmp/addons/setup -i
Close & reopen the IPCop GUI - you should have an extra tab on the far right - ADDONS

Installing Traffic Control & Report:
Code:
root@ipcop: mkdir /tcar
root@ipcop: tar -zxvf /tmp/Tr*.gz -C /tcar/
root@ipcop: /tcar/setup -i
Close & reopen the IPCop GUI - you should have an extra entry in SERVICES - TRAFFIC CONTROL&REPORT

Update tcar_sendEmail:
Code:
root@ipcop: tar -zxvf /tmp/send*.gz -C /tmp/
root@ipcop: cp /tmp/sendEmail-v1.54/sendEmail /usr/local/bin/tcar_sendEmail
TCAR is now installed but inactive.

WARNING: when TCAR is activated all internet access is limited to the TCAR whitelist which is initially empty - see next post for TCAR setup.
 
Old 10-04-2009, 11:22 AM   #11
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
Setting up TCAR

From the IPCop GUI

From SERVICES>TRAFFIC CONTROL&REPORT

Under Control & Report system parameters complete Admin's email: (eg fred@your.isp) and SMTP server host: (eg smtp.your.isp).

Tick enabled and click the SAVE button. TCAR is now active and controlling access to the RED interface. Try a google search from your PC to prove it's blocked.

Now from LOGS>FIREWALL LOGS identify your blocked PC IP address & MAC address(if required, prevents spoofing).

Back to SERVICES>TRAFFIC CONTROL&REPORT

Under Add new user complete:

User name eg my laptop
IP Address - required
MAC Address - optional
Interface - green should be the only option
User email - required, need not be valid
1Mb cost - required enter "1" for starters
Currency - required enter "cents" for starters
* Max incoming to user traffic (Mb) - optional
Enabled: - should be ticked

Click the Add button to save

Finally scroll to the top of the screen and click the Accept Changes button.

*Warning - there are 2 enabled check boxes, the first is on the Max traffic line which if ticked and Max traffic has no value entered will block RED access according to the rule limit incoming traffic to 0Mb

Once you have some PCs controlled you can click on Users info (Downloaded traffic, blocked status) at the top of the screen for statistics.
 
Old 10-05-2009, 02:15 AM   #12
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
Thank you very much Mickza, your help is very much appreciated.

I was wondering, is there a way to allow the blocked users to check their webmail. Otherwise they don't now whats going on with the internet (they think its not working).

Thanks again,
James
 
Old 10-07-2009, 11:59 AM   #13
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
Please define blocked:

a) because they are not enabled in TCAR?

or

b) because they have exceeded their traffic limit?
 
Old 10-08-2009, 04:53 AM   #14
jameske
LQ Newbie
 
Registered: Sep 2009
Posts: 13

Original Poster
Rep: Reputation: 0
b) Because they have exceeded their traffic limit.
 
Old 10-10-2009, 10:43 AM   #15
mickza
Member
 
Registered: Mar 2005
Location: South Africa
Distribution: Centos, Fedora, Ubuntu desktop, IPCop
Posts: 168

Rep: Reputation: 33
Sorry, you would need a local mail server to do this, unfortunately there is no mail server available for use on the IPCop box.
 
  


Reply

Tags
adsl, internet, quota


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Connect Linux box to internet through ADSL router arbangara Linux - Networking 2 07-23-2008 11:41 AM
Internet connection quota with Linux gateway swcng2001 Linux - Networking 2 05-26-2006 10:20 AM
adsl connection problem, linux cannot connect to internet, but windows can backbone Linux - Networking 7 12-18-2005 02:11 PM
Linux internet using adsl router Wozl Linux - Networking 4 02-09-2005 06:01 AM
Can't connect to Internet using ethernet/adsl/pppoe on Mandrake Linux 9.2 susheeljohn Linux - Networking 2 02-25-2004 03:32 PM


All times are GMT -5. The time now is 01:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration