4129 links
740 private links
  • Doo's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
  • ► Jouer les vidéos
Links per page: 20 50 100
3 results tagged nftables x
  • bash_completion/nft-completion at main · Zulugitt/bash_completion
    _nft()
    {
        local cur prev
        COMPREPLY=()
        cur="${COMP_WORDS[COMP_CWORD]}"
        prev="${COMP_WORDS[COMP_CWORD-1]}"
    
        local families="ip ip6 arp bridge inet netdev"
        local sets=$(nft list sets | grep -i "set" | awk '{print $2 }' | tr -d ' ')
    
        if [ $COMP_CWORD -eq 1 ]; then
            COMPREPLY=( $(compgen -W "add flush list" -- $cur) )
        elif [ $COMP_CWORD -eq 2 ]; then
            case "$prev" in
                "add")
                    command="${prev}"
                    COMPREPLY=( $(compgen -W "element map table set" -- $cur) )
                    ;;
                "list")
                    COMPREPLY=( $(compgen -W "chains ruleset set sets table tables" -- $cur) )
                    ;;
                "flush")
                    COMPREPLY=( $(compgen -W "table" -- $cur) )
                    ;;
                *)
                    ;;
            esac
        elif [ $COMP_CWORD -eq 3 ]; then
            case "$prev" in
                "table")
                    COMPREPLY=( $(compgen -W "${families}" -- $cur) )
                    ;;
                "set"|"element"|"map")
                    local tables=$(nft list tables | awk '{print $3 }' | tr -d ' ')
                    COMPREPLY=( $(compgen -W "${tables}" -- $cur) )
                    ;;
                *)
                    ;;
            esac
        elif [ $COMP_CWORD -eq 4 ]; then
            local tables=$(nft list tables | awk '{print $3 }' | tr -d ' ')
            if [[ "$families" =~ "$prev" ]]; then
                local tables=$(nft list tables "${prev}" | awk '{print $3 }' | tr -d ' ')
                COMPREPLY=( $(compgen -W "${tables}" -- $cur) )
            fi
    
            if [ "${COMP_WORDS[1]}" != "add" ] && [[ "$tables" =~ "$prev" ]]; then
                COMPREPLY=( $(compgen -W "${sets}" -- $cur) )
            fi
    
            if [ "${COMP_WORDS[1]}" == "add" ] && [ "${COMP_WORDS[2]}" == "element" ] && [[ "$tables" =~ "$prev" ]]; then
                COMPREPLY=( $(compgen -W "${sets}" -- $cur) )
            fi
        fi
    
        return 0;
    }
    
    complete -F _nft nft
    January 7, 2025 02:42:01 PM GMT+01:00 * - permalink -
    QRCode
    - https://github.com/Zulugitt/bash_completion/blob/main/nft-completion
    nftables
  • Explaining My Configs: nftables · stosb

    Un truc un peu pédago qui parle de nftables

    January 6, 2020 10:41:38 AM GMT+01:00 * - permalink -
    QRCode
    - https://stosb.com/blog/explaining-my-configs-nftables/
    nftables
  • thumbnail
    What comes after ‘iptables’? It’s successor, of course: `nftables` – Red Hat Developer Blog

    via blue, le remplaçant d'iptables codé par redhat, les syntaxes sont orientées "block" pour éviter les séquences imho, ça m'a l'air bien puissant

    November 2, 2016 10:13:05 AM GMT+01:00 * - permalink -
    QRCode
    - http://developers.redhat.com/blog/2016/10/28/what-comes-after-iptables-its-successor-of-course-nftables/
    iptables nftables
Links per page: 20 50 100
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation