Skip to content

Instantly share code, notes, and snippets.

@tg12
Created January 30, 2021 10:05
Show Gist options
  • Select an option

  • Save tg12/5e6435694e5491f9cc32b41ae7b29f70 to your computer and use it in GitHub Desktop.

Select an option

Save tg12/5e6435694e5491f9cc32b41ae7b29f70 to your computer and use it in GitHub Desktop.

Revisions

  1. tg12 created this gist Jan 30, 2021.
    32 changes: 32 additions & 0 deletions dscp-class ef
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@

    iptables -t mangle -A OUTPUT -p udp -j DSCP --set-dscp-class ef


    root@raspberrypi:~# iptables -t nat -L
    Chain PREROUTING (policy ACCEPT)
    target prot opt source destination

    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain POSTROUTING (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    root@raspberrypi:~# iptables -t mangle -L
    Chain PREROUTING (policy ACCEPT)
    target prot opt source destination

    Chain INPUT (policy ACCEPT)
    target prot opt source destination

    Chain FORWARD (policy ACCEPT)
    target prot opt source destination

    Chain OUTPUT (policy ACCEPT)
    target prot opt source destination
    DSCP udp -- anywhere anywhere DSCP set 0x2e

    Chain POSTROUTING (policy ACCEPT)
    target prot opt source destination