Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
74
rated 0 times [  74] [ 0]  / answers: 1 / hits: 200607  / 1 Year ago, tue, may 9, 2023, 12:07:49

I know that I can enable IP forward by echoing 1 to /proc/sys/net/ipv4/ip_forward, but how can I make this permanent?



By the way I want another method rather than start up scripts, is there any?


More From » routing

 Answers
6

Edit /etc/sysctl.conf and search for the following lines:



# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1


Uncomment net.ipv4.ip_forward=1:



# Uncomment the next line to enable packet forwarding for IPv4
net.ipv4.ip_forward=1


Or in one line command :



sudo sysctl -w net.ipv4.ip_forward=1

[#30636] Tuesday, May 9, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
farnic

Total Points: 409
Total Questions: 117
Total Answers: 125

Location: Andorra
Member since Sat, May 27, 2023
1 Year ago
;