Page 1 of 1

How to control the flow of clients

Posted: Fri Aug 14, 2015 3:07 am
by itviewer
For example, I would like to limit each vpn client only 2GB daily traffic,How to do that?
Thanks.

Re: How to control the flow of clients

Posted: Fri Aug 14, 2015 3:39 am
by kh_tsang
Assign a VLAN per user and do this in your linux operating system.

Re: How to control the flow of clients

Posted: Fri Aug 14, 2015 6:33 am
by itviewer
kh_tsang wrote:
> Assign a VLAN per user and do this in your linux operating system.

Sorry,Can you explain it in detail?

What I imagined just like AAA(by RADIUS), but I do not know how to operate。

Re: How to control the flow of clients

Posted: Fri Aug 14, 2015 9:45 am
by kh_tsang
When you add a user in the virtual hub, you can define a VLAN ID.
You may add a tap device(e.g. tap_hub1).
Then, add one VLAN interface(e.g. tap_tap.1) for each user and bridge them using a linux bridge.
You can measure the traffic according to the adapter. If it reaches the limit, you can add an iptables rule to filter the traffic and redirect them to a web server showing a quota exceeded notice. Finally, you can record the value, flush the iptables rules every day at 00:00 and measure the traffic with reference to the last record.