However, the Linux kernel doesn't listen to ICMP redirects when it is configured as router and not as host. So, be careful setting up routing tables for routers. They have to be complete. No hints from other hosts will be accepted and only the local routing table decides where packages go.
Disable ICMP Redirects:
In most of the Linux flavors (Debian, Ubuntu, Redhat Enterprise linux, OpenSuSe) ICMP Redirects can be dynamically disabled on the host by adding the proper entries in the /etc/sysctl.conf configuration file. Simply edit the /etc/sysctl.conf file and add the following entries:
net.ipv4.conf.all.accept_redirects = 1For Ipv6
net.ipv4.conf.all.send_redirects = 1
net.ipv6.conf.all.accept_redirects = 1
net.ipv6.conf.all.send_redirects = 1