Routování paketů je nutné v kernelu nejdříve ZAPNOUT! RIP -

Check if IP Forwarding is enabled

Using sysctl:

sysctl net.ipv4.ip_forward
net.ipv4.ip_forward = 0

or just checking out the value in the /proc system:

cat /proc/sys/net/ipv4/ip_forward

Enable IP Forwarding on the fly

sysctl -w net.ipv4.ip_forward=1


echo 1 > /proc/sys/net/ipv4/ip_forward

Permanent setting using /etc/sysctl.conf

If we want to make this configuration permanent the best way to do it is using the file /etc/sysctl.conf where we can add a line containing net.ipv4.ip_forward = 1 /etc/sysctl.conf:

net.ipv4.ip_forward = 1

if you already have an entry net.ipv4.ip_forward with the value 0 you can change that 1. To enable the changes made in sysctl.conf you will need to run the command:

sysctl -p /etc/sysctl.conf

on Debian/Ubuntu systems this can be also done restarting the procps service:

/etc/init.d/ restart

linux/routovani.txt · Poslední úprava: 13.01.2012 22:41 autor: wladik

Nástroje pro stránku