pondelok 18. apríla 2022

Linux IP forwarding – How to Disable/Enable using net.ipv4.ip_forward

RHCSA question: 

 Linux IP forwarding – How to Disable/Enable using net.ipv4.ip_forward


How to forward packets? 


- using: firewall, router, NAT networking


1) we need use directory /proc/sys/net


what is in /proc/sys/net ? 


- In directory /proc/sys we find information about kernel parameters (/proc/sys/net) - we find information about network kernel parameters





- check: 


 cat /proc/sys/net/ipv4/ip_forward


2) What is sysctl? 


sysctl is tool which we configurate certain aspects of Linux kernel


- configuration of sysctl we find in /etc/sysctl.conf


- our solution of ipv4 ip forwarding? 


vi /etc/sysctl.conf

or

nano /etc/sysctl.conf


and: 


net.ipv4.ip_forward = 1

 


- after eding: run


sysctl -p


what is -p at systctl command? 


from man:

    Load in sysctl settings from the file specified or /etc/sysctl.conf if none given.  Specifying - as filename means reading data from standard input.  Using this option will mean arguments to sysctl  are  files,  which are read in the order they are specified.  The file argument may be specified as regular expression.


3) time for watching Jurgen Klopp enthusiasm

Žiadne komentáre:

Zverejnenie komentára