#Limit Network
48 messages · Page 1 of 1 (latest)
That would be very nice actually
Not directly through pterodactyl. I didn’t do this before so I’m not an expert but it should be possible directly through docker
Yeah, as running a bot host- people tend to sometimes make code to want to hurt others :(
DUDE FR
That reminds me of this one meme (or maybe happened) where there where two people who owned a rack in a datacenter
and one of them was appearntly DDoSing the other
Yeah I'm aware you can't do through pterodactyl and need to do via terminal, however, docker does not have a network limiter built in, sadly. So I'm not sure how to do it a proper way for current and new servers that would be made
😭
Thats crazy
docker doesn't have a network limiter built in
Fr?
I've seen it done before
Me too
If you want a limit on the docker network (basically all servers and the wing together) Traffic Control is an option
I’m from Germany, best Hoster for my experience here is Hetzner. They’r ddos protection is VERY NICE…
One of my customers was attacked using ddos. Hetzner was like: hmm let’s shutdown his complete network traffic
But we were attacked and not attacking 😭
I think it's possible
after talking with chat GPT
It says something like
#!/bin/bash
for container in $(docker ps -q); do
veth=$(docker inspect --format='{{.NetworkSettings.SandboxKey}}' $container | xargs basename)
tc qdisc add dev $veth root tbf rate 1mbit burst 32kbit latency 400ms
done
Yeah. I mean it can be done, just docker doesn't have it built in fully. You need to use some other sort of package on linux
Yeah, that is. However, need to understand how that works plus having it check every x seconds to see for new containers to apply the limits
whhich can be done through CRON
yeah
Hmm yeah
Docker can limit bandwidth per network
Hmm
That could work until we get 50+ accounts/servers then itll need to be throttled, right?
I'd do this
but if you wanted you could do a global limit on top of that
although doesn't really make any real world sense
I love talking about anything linux related lmao
Yeah, gonna set up a a script to have this run every 5 seconds (is that bad if i run it every 5 seconds?) have a systemctl to make sure it stays on 24/7 and applies these
5 seconds is fine
use cron or something
maybe 5 seconds is very extra
30 seconds would be plenty
it's fine if they make a server and aren't limited for the first little while
Idk if cron can do 30 seconds
Just do one minute
just make a bash script for example
limitBandwidth.sh
#!/bin/bash
for container in $(docker ps -q); do
veth=$(docker inspect --format='{{.NetworkSettings.SandboxKey}}' $container | xargs basename)
tc qdisc add dev $veth root tbf rate 1mbit burst 32kbit latency 400ms
done
crontab -e
* * * * * /home/<user>/limitBandwidth.sh
or where ever you put it
I think I would have to make a loop in the script itself to make 30 seconds and service to make sure it stays running