Hello everyone, is it possible to do something like QoSmate for SQM and see the connections that appear with DSCP? Thank you.
@Hudra
@dlakelan
@choppyc
config queue
option enabled '1'
option interface 'eth1'
option download '750000'
option upload '750000'
option debug_logging '0'
option verbosity '5'
option qdisc 'cake'
option script 'layer_cake.qos'
option qdisc_advanced '1'
option squash_dscp '1'
option squash_ingress '1'
option ingress_ecn 'ECN'
option egress_ecn 'NOECN'
option qdisc_really_really_advanced '1'
option iqdisc_opts 'diffserv4 dual-dsthost nat ingress nowash noatm overhead 44'
option eqdisc_opts 'diffserv4 dual-srchost nat wash noatm overhead 44'
option linklayer 'none'
config rule
list dest_ip '192.168.2.168'
option set_dscp 'CS4'
option target 'DSCP'
option src 'wan'
option name 'port 3074 ps5 julien'
option family 'ipv4'
option dest 'lan'
list proto 'tcp'
list proto 'udp'
list proto 'icmp'
I would also like, based on dlakelan, to see the interface of its servers, similar to what this script I created in the past does.
this is the script geofilter found server
#!/bin/sh
############################################################
ipconsole={192.168.2.168} # ajoute ta console
#port={3074}
nft add table inet dopam # autorise
nft flush table inet dopam # nettoie les regles
nft -f /dev/stdin <<EOF
table inet dopam {
### change pour choisir ce que tu veux
set udp_meter4 {typeof ip saddr . ip daddr . udp sport . udp dport
timeout 5m
}
set tcp_meter4 {typeof ip saddr . ip daddr . tcp sport . tcp dport
timeout 5m
}
chain dopam {
type filter hook forward priority 0; policy accept;
#udp sport $port
#udp dport $port
ip protocol tcp ip daddr $ipconsole
ip protocol tcp ip saddr $ipconsole
ip protocol udp ip daddr $ipconsole
ip protocol udp ip saddr $ipconsole
#choisi ton protocole pour ce que tu veux
ip protocol udp ip daddr $ipconsole add @udp_meter4 {ip saddr . ip daddr . udp sport . udp dport}
ip protocol tcp ip daddr $ipconsole add @tcp_meter4 {ip saddr . ip daddr . tcp sport . tcp dport}
#ip protocol udp udp sport $port add @udp_meter4 {ip saddr . ip daddr . udp sport . udp dport}
}
}
EOF
#### lancer la commande nft list ruleset
#### lancer la commande nft list ruleset
### Init Script ###
## Check if the file does not exist
if [ ! -f "/etc/init.d/DOPAMSERVER" ]; then
cat << "INITSCRIPT" > /etc/init.d/DOPAMSERVER
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
STOP=99
service_triggers() {
procd_add_reload_trigger firewall
}
start_service() {
/etc/init.d/DOPAMSERVER enabled || exit 0
echo start
procd_open_instance
procd_set_param command /bin/sh "/root/DOPAMSERVER.sh"
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
restart() {
/etc/init.d/DOPAMSERVER enabled || exit 0
echo restart
/root/DOPAMSERVER.sh
}
stop_service() {
echo stop
############################################################
## Default warning settings
uci -q get dhcp.odhcpd.loglevel | grep "4" > /dev/null 2>&1 || {
uci set dhcp.odhcpd.loglevel="4"
uci commit && reload_config
}
############################################################
############################################################
exit 0
}
reload_service() {
start
}
INITSCRIPT
chmod 755 /etc/init.d/DOPAMSERVER > /dev/null 2>&1
/etc/init.d/DOPAMSERVER enable > /dev/null 2>&1
fi
############################################################
### Hotplug ###
## Check if the file does not exist
if [ ! -f "/etc/hotplug.d/iface/99-DOPAMSERVER" ]; then
cat << "HOTPLUG" > /etc/hotplug.d/iface/99-DOPAMSERVER
#!/bin/sh
[ "$ACTION" = ifup ] || [ "$ACTION" = ifupdate ] || exit 0
[ "$ACTION" = ifupdate ] && [ -z "$IFUPDATE_ADDRESSES" ] && [ -z "$IFUPDATE_DATA" ] && exit 0
# Ensure that the script is executable by Owner
if [ ! -x "/root/DOPAMSERVER.sh" ] || [ ! -x "/etc/init.d/DOPAMSERVER" ]; then
chmod 755 /root/DOPAMSERVER.sh
chmod 755 /etc/init.d/DOPAMSERVER
fi
# Check if the init script is enabled to reload the script
/etc/init.d/DOPAMSERVER enabled || exit 0
# Reloading the script
logger -t DOPAMSERVER "Reloading DOPAMSERVER.sh due to $ACTION of $INTERFACE ($DEVICE)"
sleep 10 && /etc/init.d/DOPAMSERVER restart
HOTPLUG
fi