add step for net.ipv4.ip_forward parameter

This commit is contained in:
Max Erenberg 2021-07-03 01:13:17 -04:00
parent 30429a9ef4
commit 2af31ea20a
2 changed files with 14 additions and 10 deletions

View File

@ -43,6 +43,20 @@ create a `hosts` file before running any of the playbooks. Copy the
cp hosts.sample hosts cp hosts.sample hosts
``` ```
**Important**: You will need to edit the hosts file, particularly the
value of `upstream_dns`. It should be one of the nameservers which the
VM is using (check /etc/resolv.conf).
**Also important**: You need to enable packet forwarding in the VM. Add
or uncomment the following line in `/etc/sysctl.conf`:
```
net.ipv4.ip_forward=1
```
Then run:
```
sysctl -p
```
Make sure you have the `bridge-utils` package installed in the VM. Make sure you have the `bridge-utils` package installed in the VM.
This should be installed by default on Ubuntu, but you may have to manually This should be installed by default on Ubuntu, but you may have to manually
install it on Debian. install it on Debian.

View File

@ -69,16 +69,6 @@ Once you have created the container, edit the following line in
lxc.net.0.link = lxcbr2 lxc.net.0.link = lxcbr2
``` ```
You also need to enable packet forwarding in the VM. Add or enable the
following line in `/etc/sysctl.conf`:
```
net.ipv4.ip_forward=1
```
Then run:
```
sysctl -p
```
As usual, chroot into the container and install python3. As usual, chroot into the container and install python3.
Then start it and run the playbook: Then start it and run the playbook:
``` ```