Enable IPv4 Forwarding With Sed Command
This commit is contained in:
@@ -59,20 +59,12 @@
|
||||
```
|
||||
|
||||
### Step 4: Enable IPv4 Forwarding
|
||||
1. Edit the sysctl configuration file to enable IPv4 forwarding.
|
||||
1. Update Config File
|
||||
```bash
|
||||
vim /etc/sysctl.conf
|
||||
```
|
||||
Add or uncomment the following line:
|
||||
```
|
||||
net.ipv4.ip_forward=1
|
||||
```
|
||||
2. Apply the changes.
|
||||
```bash
|
||||
sysctl -p
|
||||
sysctl --system
|
||||
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf && sysctl -p
|
||||
```
|
||||
|
||||
|
||||
### Step 5: Install Required Packages
|
||||
1. Install necessary packages.
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user