Merge "Use nftables when we can"
This commit is contained in:
commit
5feaf4d3f6
|
@ -14,13 +14,16 @@
|
|||
ip -${ipv} a &>> /var/log/extra/network.txt;
|
||||
echo "### IPv${ipv} routing" >> /var/log/extra/network.txt;
|
||||
ip -${ipv} r &>> /var/log/extra/network.txt;
|
||||
echo "### IPTables (IPv${ipv})" &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 4 && iptables-save &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 6 && ip6tables-save &>> /var/log/extra/network.txt;
|
||||
echo "### IPTables Stats (IPv${ipv})" &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 4 && iptables -vnL &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 6 && ip6tables -vnL &>> /var/log/extra/network.txt;
|
||||
if [[ ! $(command -v nft) ]]; then
|
||||
echo "### IPTables (IPv${ipv})" &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 4 && iptables-save &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 6 && ip6tables-save &>> /var/log/extra/network.txt;
|
||||
echo "### IPTables Stats (IPv${ipv})" &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 4 && iptables -vnL &>> /var/log/extra/network.txt;
|
||||
test $ipv -eq 6 && ip6tables -vnL &>> /var/log/extra/network.txt;
|
||||
fi
|
||||
done;
|
||||
command -v nft && nft list ruleset &>/var/log/extra/nftables.txt;
|
||||
(for NS in $(ip netns list | cut -f 1 -d " "); do
|
||||
for ipv in 4 6; do
|
||||
echo "==== $NS (${ipv})====";
|
||||
|
|
Loading…
Reference in New Issue