From a986d0ed2466237157bf1f688389ce290252d25d Mon Sep 17 00:00:00 2001 From: RadinPirouz <75082987+RadinPirouz@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:01:24 +0330 Subject: [PATCH] Enable IPv4 Forwarding With Sed Command --- kubernetes/info.md | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/kubernetes/info.md b/kubernetes/info.md index 18bff60..d7f8f31 100644 --- a/kubernetes/info.md +++ b/kubernetes/info.md @@ -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