Openwrt 18.06(Snapshot) custom builds for TP-LINK WR740N(D) WA801N(D) WR840N(D) WR841N(D) WR940N(D) WR941N(D) ( with wifi enabled in default & working Zram-swap))

Well, I'm going to tell you something...

My original version is WR940N(ES) V6, but I flashed the latest official (EU) version (if I remember correctly) and I got everything in English but updated and working fine.

The real hardware version is (ES). Could you please help me with that?

The thing is that it doesn't check any region when you flash via TFTP, but it's not working for me. Every firmware bricks my device

Solution is here. i will include the modification later.

1 Like

Thank you @humanOS. I appreciate your support :pray:t3:
Can't wait to flash it and see my router being the best device it could be! :partying_face:

1 Like

Blockquote Yeah. possible. You can create maximum 4 wireless AP. Also You can use mac address based speed control. it is quite simple, if u need i can share a simple custom firewall for mac base speed control

Hi @humanOS . How are you doing?
Bro, may you share that custom firewall for mac base speed control please? I would like to add that possibility to my router

okay.

#Zero Marking Users
Z1Name="Ali"
Z1MAC=B4:CD:27:CF:B4:1F

# Slow Marking Users
S1Name="Nokia 5"
S1MAC=CC:9F:7A:22:FE:16
S2Name="itel A"
S2MAC=A4:F4:65:1A:84:4A
S3Name="Primo E8s"
S3MAC=D8:16:C1:54:01:B3
S4Name="Alamin2"
S4MAC=7C:D6:61:AE:2E:AC
S5Name="Anisha"
S5MAC=80:4E:70:54:76:E6
#S6Name="Nusrat"
#S6MAC=88:9F:6F:7B:C5:B2

# Medium Marking Users
M1Name="Oppo kamal"
M1MAC=C4:40:F6:C3:FB:23
M2Name="Zenfone Max Pro"
M2MAC=04:92:26:A7:BA:19
M3Name="Nusrat"
M3MAC=88:9F:6F:7B:C5:B2

# Speed Groups
Group1Name="Slow Internet"
Group2Name="Medium Internet"
Group3Name="Zero Internet"

# kb/s means kilobytes per second
SlowInternet=150kb/s
MediumInternet=250kb/s
ZeroInternet=30kb/s

SlowMark=0xA
MediumMark=0xB
ZeroMark=0xC

# Rules to set slow markings
iptables -t nat -A prerouting_rule -m mac --mac-source $S1MAC -j MARK --set-mark $SlowMark -m comment --comment "$S1Name"
iptables -t nat -A prerouting_rule -m mac --mac-source $S2MAC -j MARK --set-mark $SlowMark -m comment --comment "$S2Name"
iptables -t nat -A prerouting_rule -m mac --mac-source $S3MAC -j MARK --set-mark $SlowMark -m comment --comment "$S3Name"
iptables -t nat -A prerouting_rule -m mac --mac-source $S4MAC -j MARK --set-mark $SlowMark -m comment --comment "$S4Name"
iptables -t nat -A prerouting_rule -m mac --mac-source $S5MAC -j MARK --set-mark $SlowMark -m comment --comment "$S5Name"
#iptables -t nat -A prerouting_rule -m mac --mac-source $S6MAC -j MARK --set-mark $SlowMark -m comment --comment "$S6Name"

# Rules to set medium markings
iptables -t nat -A prerouting_rule -m mac --mac-source $M1MAC -j MARK --set-mark $MediumMark -m comment --comment "$M1Name"
iptables -t nat -A prerouting_rule -m mac --mac-source $M2MAC -j MARK --set-mark $MediumMark -m comment --comment "$M2Name"
iptables -t nat -A prerouting_rule -m mac --mac-source $M3MAC -j MARK --set-mark $MediumMark -m comment --comment "$M3Name"

#Rules to set zero markings
iptables -t nat -A prerouting_rule -m mac --mac-source $Z1MAC -j MARK --set-mark $ZeroMark -m comment --comment "$Z1Name"
#iptables -t nat -A prerouting_rule -m mac --mac-source $Z2MAC -j MARK --set-mark $ZeroMark -m comment --comment "$Z2Name"

# If a packet is marked, make sure the connection is marked as well
iptables -t nat -A prerouting_rule -m mark --mark $SlowMark -j CONNMARK --save-mark
iptables -t nat -A prerouting_rule -m mark --mark $MediumMark -j CONNMARK --save-mark
iptables -t nat -A prerouting_rule -m mark --mark $ZeroMark -j CONNMARK --save-mark

# On incoming packets, make sure to read the connection mark back into the packet
iptables -t mangle -A PREROUTING -j CONNMARK --restore-mark

# limit the speed
iptables -A forwarding_rule -m mark --mark $SlowMark -m conntrack --ctstate ESTABLISHED,RELATED -m hashlimit --hashlimit-name "$Group1Name" --hashlimit-above $SlowInternet -j DROP
iptables -A forwarding_rule -m mark --mark $MediumMark -m conntrack --ctstate ESTABLISHED,RELATED -m hashlimit --hashlimit-name "$Group2Name" --hashlimit-above $MediumInternet -j DROP
iptables -A forwarding_rule -m mark --mark $ZeroMark -m conntrack --ctstate ESTABLISHED,RELATED -m hashlimit --hashlimit-name "$Group3Name" --hashlimit-above $ZeroInternet -j DROP
1 Like

Hello,
Was that not possible?

No. AdBlock is not fitted in 4mb flash.

Oh, I didn't ask about adblock, that was someone else.

Can you make a build with https-dns-proxy and luci-app-https-dns-proxy?

I had tried to build without luci-web-interface but no luck, 4mb flash do not enough space to meet the requirements for https-dns.

1 Like