ip forwarding linux / centos
DESCRIPTION
IP Forwarding in Linux / centOS 6TRANSCRIPT
IP Forwarding
IP Forwarding is more commonly reffered to as routing. Routers connect and facilitate communication between multiple networks. When you try to find site on an outside network, it needs a gateway address. This corresponding to the IP address of a route on LAN.
To use RHEL system as router, you should enable IP forwarding in the /etc/sysctl.conf configuration by changing
net.ipv4.ip_forward = 0
to
net.ipv4.ip_forward = 1
The changes take effect on the next reboot. Until then ip forwarding can be enabled with the below command
echo 1 > /proc/sys/net/ipv4/ip_forward
You need to enable routing through the firewalls for communication to other networks.
# iptables -A FORWARD –o wlan0 –j ACCEPT
# iptables -A FORWARD –o virbr0 –j ACCEPT
# iptables -A FORWARD –o virbr1 –vimj ACCEPT