Memo/simulate-packet-loss-with-nftables

1 分钟阅读

使用 nftables 模拟丢包

丢弃指定 TCP 端口的入站流量并恢复规则。

丢弃目标端口的入站 TCP 流量:

sudo nft create table ip filter
sudo nft add chain ip filter input { type filter hook input priority 0 \; }
sudo nft add rule ip filter input tcp dport 3888 counter drop

恢复前先查看 handle,再删除对应规则:

sudo nft list chain ip filter input
sudo nft delete rule ip filter input handle n

相关阅读

Memo通过 SSH 迁移 btrfs volumesMemo把 ArchLinux 当成无线路由器用Memo网络与 DNS 资料

讨论

邮箱用于身份识别和回复通知,并由 Waline 存储。