How can a noob like me limit bandwidth in Debian

Discussion in 'HOWTO-Related Questions' started by mzabret, Nov 23, 2005.

  1. mzabret

    mzabret New Member

    Hello.

    Im a newbie in Linux operating system, and was wondering if you can tell me in simple steps or step by step tutorial that works, how can I limit to a user, let's say he can transfer 20 GB per month?

    Any program, script, as long as it is working and that it doesnt eat a lot of CPU and RAM would be fine.

    Please.


    Best regards, Martin.
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Do you want to limit a specific service, like FTP downloads from this server or do you want to limit the traffic on a gateway server?
     
  3. mzabret

    mzabret New Member

    I want to limit the users traffic.

    Like user 'example' is running a website from his folder, and let's say I wan't to give him 20 GB of traffic per month.

    How would this easily be done? If you can.. :eek:

    Best regards, Martin.
     
  4. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    I would like to know this too. Thank you.
     
  5. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    You can either do traffic limits like ISPConfig is doing them by analysing the logfiles for web, ftp and email traffic and resolve the user.

    Or you can limit the traffic for ports on your network card, but this is not user specific.
     
  6. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    I dont know if this feature is really OK. I have traffic limits for 200MB for my website, and total traffic is now of 319MB and I can still get to see it through mozilla firefox without any warning. I dont know what to check. Any ideas?
    Thanks for your help.
     
  7. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Which action have you enabled in ISPConfig? Warning or site suspension?

    Are the 319 MB shown in ISPConfig traffic stats for this site or in any other monitoring software?
     
  8. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    I have suspension, and the data is reported by ispconfig. What should I look for? Because ispconfig reports the website as "suspended" and not active, but I can reach it with no effort with mozilla firefox...
    Thanks for your time.
     
  9. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Maybe your browser cache? :confused:
    Please post the output of
    Code:
    ls -la /var/www/web<id>
    (or wherever ISPConfig creates the web sites on your system).
     
  10. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    I deleted the browser cache and still could view the webpage. This is what i get with the command:
    Code:
    dan@alcon:~$ ls -la /var/www/web1
    total 16
    drwxr-xr-x  8 dampalacios web1 368 2005-12-20 23:47 .
    drwxr-xr-x  8 root        root 328 2005-12-21 04:11 ..
    -rw-------  1       10001 web1  27 2005-12-19 01:07 .bash_history
    drwxrwxr-x  2 dampalacios web1 104 2005-12-15 16:43 cgi-bin
    -rw-------  1 dampalacios web1  24 2005-12-20 23:47 .forward
    -rw-rw-r--  1 root        web1  26 2005-12-21 04:00 .htpasswd
    drwxr-xr-x  3 dampalacios web1 160 2005-12-19 00:30 log
    lrwxrwxrwx  1 root        root  38 2005-12-20 23:47 Maildir -> /var/www/web1/user/dampalacios/Maildir
    drwxrwxr-x  2 dampalacios web1  80 2005-12-15 16:43 phptmp
    -rw-r--r--  1 root        root 444 2005-12-20 23:47 .procmailrc
    drwxr-xr-x  2 dampalacios web1  80 2005-12-15 16:43 ssl
    drwxr-xr-x  3 dampalacios web1 112 2005-12-20 08:11 user
    lrwxrwxrwx  1 root        root  46 2005-12-20 23:47 .vacation.cache -> /var/www/web1/user/dampalacios/.vacation.cache
    drwxrwxr-x  4 dampalacios web1 168 2005-12-20 09:28 web
    
    Is that ok?
     
  11. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    The permissions should be
    Code:
    dr--------  8 root root 368 2005-12-20 23:47 .
    instead of

    Code:
    drwxr-xr-x  8 dampalacios web1 368 2005-12-20 23:47 .
    if your site had been suspended by ISPConfig.
     
  12. danf.1979

    danf.1979 ISPConfig Developer ISPConfig Developer

    OK, so thats why permissions changed some days ago. I thought I was being hacked. Lol.
    Many thanks
     

Share This Page