Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixup for #647 #651

Merged
merged 1 commit into from
Sep 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions offline/ubuntu22.04_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -359,27 +359,28 @@ sysctl -p;
'
```

### enable network masquerading
### Enable network masquerading

Here, you should check the ethernet interface name for your outbound IP.
To prepare determine the interface of your outbound IP:

```
ip ro | sed -n "/default/s/.* dev \([en\(ps|o)0-9]*\) .*/export OUTBOUNDINTERFACE=\1/p"
export OUTBOUNDINTERFACE=$(ip ro | sed -n "/default/s/.* dev \([en\(ps|o)0-9]*\) .*/\1/p")
echo OUTBOUNDINTERFACE is $OUTBOUNDINTERFACE
```

This will return a shell command setting a variable to your default interface. copy and paste it into the command prompt, hit enter to run it, then run the following
Please Check that `OUTBOUNDINTERFACE` is correctly set, before running enabling network masquerading:

```
sudo bash -c '
sudo bash -c "
set -eo pipefail;

sed -i 's/.*DEFAULT_FORWARD_POLICY=.*/DEFAULT_FORWARD_POLICY="ACCEPT"/' /etc/default/ufw;
sed -i "1i *nat\n:POSTROUTING ACCEPT [0:0]\n-A POSTROUTING -s 172.16.0.0/24 -o $OUTBOUNDINTERFACE -j MASQUERADE\nCOMMIT" /etc/ufw/before.rules;
sed -i \"1i *nat\n:POSTROUTING ACCEPT [0:0]\n-A POSTROUTING -s 172.16.0.0/24 -o $OUTBOUNDINTERFACE -j MASQUERADE\nCOMMIT\" /etc/ufw/before.rules;
service ufw restart;
'
"
```

### add static IPs for VMs.
### Add static IPs for VMs.

```
sudo bash -c '
Expand Down