sudo bash -c "echo 'net.bridge.bridge-nf-call-iptables=1'>>/etc/sysctl.conf"

sudo bash -c "echo 'net.bridge.bridge-nf-call-ip6tables=1'>>/etc/sysctl.conf"

 

sudo bash -c "echo 'net.core.default_qdisc=fq'>>/etc/sysctl.conf"

sudo bash -c "echo 'net.ipv4.tcp_congestion_control=bbr'>>/etc/sysctl.conf"

sudo bash -c "sysctl '-p'"

 

该命令 在 Permission denied 的情况下也能执行

可用系统版本信息

cat /proc/version
Linux version 5.4.0-1101-azure (buildd@lcy02-amd64-064) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #107~18.04.1-Ubuntu SMP Tue Jan 10 21:14:56 UTC 2023

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal

 

 

sudo bash -c "apt update && sudo apt upgrade -y"

sudo bash -c "apt install kmod"

lsmod | grep bbr

cat /proc/sys/net/bridge/bridge-nf-call-iptables #查看是否在二层被iptables过滤
如果net.bridge.bridge-nf-call-iptables=1 意味着二层的网桥在转发包时也会被iptables的FORWARD规则所过滤

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注