dae/docs/getting-started/kernel-parameters.md
Kevin Yu eac04e991b
ci: add check-docs workflow (#93)
* ci: add check-docs workflow

* chore: ignore node_modules

* chore(deps): add package-lock

* style: apply formatting

* style: apply formatting

* fix: fix typo

* fix: fix all proposed changes by markdown-lint

* fix: fix trailing spaces

* fix(troubleshooting.md): apply minor fi

* fix(getting-started): apply minior fix

* ci: dont' kick off build when changes made to check-doc.yml

* ci: ONLY kick off build when target workflow file changes

* trigger build

* fix(build.yml): fix syntax

* trigger build

* fix: fix broken syntax
2023-05-21 00:41:44 +08:00

1.2 KiB

Configure Kernel Parameters

Note

Parameters will be automatically configured if global.auto_config_kernel_parameter is true.

If you set up dae as a router or other intermediate device and bind it to LAN interfaces, you need to adjust some Linux kernel parameters to make everything work fine. By default, the latest Linux distributions have IP Forwarding disabled. In the case where we need to up a Linux router/gateway or a VPN server or simply a plain dial-in server, then we need to enable forwarding. Moreover, in order to keep our gateway position and keep correct downstream route table, we should disable send-redirects. Do the followings to adjust Linux kernel parameters:

For every LAN interfaces you want to proxy:

export lan_ifname=docker0

sudo tee /etc/sysctl.d/60-dae-$lan_ifname.conf << EOF
net.ipv4.conf.$lan_ifname.forwarding = 1
net.ipv6.conf.$lan_ifname.forwarding = 1
net.ipv4.conf.$lan_ifname.send_redirects = 0
EOF
sudo sysctl --system

It is also recommended to enable IPv4 forward to avoid weird situations:

echo "net.ipv4.ip_forward = 1" | sudo tee /etc/sysctl.d/60-ip-forward.conf
sudo sysctl --system

Please modify docker0 to your LAN interface.