LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Internet Quota for ADSL using Linux (https://www.linuxquestions.org/questions/linux-networking-3/internet-quota-for-adsl-using-linux-752598/)

jameske 09-04-2009 04:12 AM

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

mickza 09-05-2009 07:43 AM

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

jameske 09-05-2009 09:53 PM

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

mickza 09-06-2009 05:37 AM

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.

jameske 09-11-2009 04:59 PM

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

mickza 09-12-2009 05:24 AM

2 Attachment(s)
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.

jameske 09-18-2009 09:11 AM

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

mickza 09-20-2009 08:07 AM

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.

jameske 09-25-2009 08:39 PM

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

mickza 10-04-2009 08:55 AM

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.

mickza 10-04-2009 10:22 AM

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.

jameske 10-05-2009 01:15 AM

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

mickza 10-07-2009 10:59 AM

Please define blocked:

a) because they are not enabled in TCAR?

or

b) because they have exceeded their traffic limit?

jameske 10-08-2009 03:53 AM

b) Because they have exceeded their traffic limit.

mickza 10-10-2009 09:43 AM

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


All times are GMT -5. The time now is 06:47 PM.