How to limit my Debian Home Server Internet (WAN) Connections (not limiting its LAN connections)

I am very happy with my Home Server but now and then it kills my latency because it uses completely our upload band (backups, peer to peer and other data exchanging with the internet).

I would like to set a limit to its download / upload that will work for all the applications and services and I would like this limit to be effective only when connections are not LAN related (I don't want my samba shares or multimedia streaming to be capped).

The server is a Wheezy Debian PPC and has a single NIC on LAN.

Any ideas?

Thanks for the kind help
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Schedule the removal of the gateway at the beginning of the day. Create a new schedule to re-add the gateway very late in the evening.
ltpittAuthor Commented:
That is correct but quite violent...

I'd like just to restrict the bandwidth...
Gerwin Jansen, EE MVETopic Advisor Commented:
Your home server has a separate nic for wan? How is that nic connected to the internet?
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ltpittAuthor Commented:
The home server has a single NIC connected to LAN.

Wan access is granted using the Adsl modem acting as Gateway...
Gerwin Jansen, EE MVETopic Advisor Commented:
Depending on which options you have available on your DSL modem, you probably need some sort of traffic shaper. Wondershaper could be an option:

What brand/type of modem do you have?

Limiting bandwidth of your peer to peer application may help as well. This is usually done in its configuration file. Limiting upload to about half of your available bandwith is what I would do.
ltpittAuthor Commented:
Wondershaper sounds good but can I limit it to work just on the WAN side?

I don't wan LAN to be slowed down too...
Gerwin Jansen, EE MVETopic Advisor Commented:
Did you already limit the upload of your P2P application? That will help ;)

About wondershaper, it isn't that well documented but you may try:

sudo wondershaper <your-network-interface-id> <download-speed> <upload-speed>

(speeds are in kilobits)

To remove the limits again:

sudo wondershaper remove <your-network-interface-id>

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ltpittAuthor Commented:
Thanks a ton!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.