How to enable IP forwarding in RHEL

Published October 12, 2014 by unixminx

To check whether or not IP forwarding is enabled, run the following command:

[root@slave ~]# sysctl -a | grep ip_forward
net.ipv4.ip_forward = 0

The 0 indicates that IP forwarding is currently disabled.

To switch IP forwarding on, the following command will need to be issued:

[root@slave ~]# sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1

Leave a comment