sora03
Posts: 60
Joined: Mon Dec 29, 2014 4:11 pm

how to limit internet not LAN speed?

Mon Jun 19, 2017 11:21 am

I am trying to limit the internet connection to be equally shared to all wifi AP clients. But I do not want to limit the LAN for streaming via VLC or SFTP. I currently have 2 Wifi interface a AP and the WiFi client to the router since ethernet is not an option.

Code: Select all


wlan0: AP mode
IP: 192.168.1.1 
DNS: 192.168.1.1 (piholed)
Gateway: 192.168.8.1 (router via wlan1)

sudo tc qdisc add dev wlan0 root handle 1:0 htb default 10
sudo tc class add dev wlan0 parent 1:0 classid 1:10 htb rate 128kbps ceil 128kbps prio 0

sudo iptables -t mangle -N shaper-out
sudo iptables -t mangle -N shaper-in

sudo iptables -t mangle -I PREROUTING -i wlan0 -j shaper-in
sudo iptables -t mangle -I POSTROUTING -o wlan0 -j shaper-out

sudo iptables -t mangle -A shaper-out -s 192.168.1.0/24 -j MARK --set-mark 1
sudo iptables -t mangle -A shaper-in -d 192.168.1.0/24 -j MARK --set-mark 1
however this limits the LAN connection, I only want to limit internet so each connected users in the wifi won't eat one another .

Return to “Networking and servers”

Who is online

Users browsing this forum: No registered users and 19 guests