Limite de Largura de Banda do Openvpn

2

Eu tenho um servidor vps com o Plesk Panel sendo executado no Centos 6.5.

Estou usando o Openvpn AS e estou pensando se há uma maneira de limitar a largura de banda por usuário (usuário local openvpn).

    
por Leonardo Gandini 21.01.2014 / 16:57

1 resposta

2

veja os documentos openvpn:

OpenvpnDoc

qoute:

--shaper n Limit bandwidth of outgoing tunnel data to n bytes per second on the TCP/UDP port. If you want to limit the bandwidth in both directions, use this option on both peers. OpenVPN uses the following algorithm to implement traffic shaping: Given a shaper rate of n bytes per second, after a datagram write of b bytes is queued on the TCP/UDP port, wait a minimum of (b / n) seconds before queuing the next write.

It should be noted that OpenVPN supports multiple tunnels between the same two peers, allowing you to construct full-speed and reduced bandwidth tunnels at the same time, routing low-priority data such as off-site backups over the reduced bandwidth tunnel, and other data over the full-speed tunnel.

Also note that for low bandwidth tunnels (under 1000 bytes per second), you should probably use lower MTU values as well (see above), otherwise the packet latency will grow so large as to trigger timeouts in the TLS layer and TCP connections running over the tunnel.

OpenVPN allows n to be between 100 bytes/sec and 100 Mbytes/sec.

Você deve adicionar um arquivo de configuração do cliente para esse usuário.

No entanto, isso torna toda a situação bastante inútil, pois o cliente pode substituir a configuração. Se você configurá-lo apenas no servidor para todos os clientes e somente o tráfego de saída do servidor.

Na melhor das hipóteses você deve checar outras idéias como fazer isso com o iptables.

veja a discussão nas listas de usuários do OpenVPN sobre isso Lista de usuários do OpenVPN

    
por 21.01.2014 / 17:25