Enable IPv4 Forwarding With Sed Command

This commit is contained in:
RadinPirouz
2024-06-10 22:01:24 +03:30
committed by GitHub
parent 719bb359f7
commit a986d0ed24

View File

@@ -59,20 +59,12 @@
``` ```
### Step 4: Enable IPv4 Forwarding ### Step 4: Enable IPv4 Forwarding
1. Edit the sysctl configuration file to enable IPv4 forwarding. 1. Update Config File
```bash ```bash
vim /etc/sysctl.conf sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf && sysctl -p
```
Add or uncomment the following line:
```
net.ipv4.ip_forward=1
```
2. Apply the changes.
```bash
sysctl -p
sysctl --system
``` ```
### Step 5: Install Required Packages ### Step 5: Install Required Packages
1. Install necessary packages. 1. Install necessary packages.
```bash ```bash