Hi all,
I need to enable IP forwarding on my picore 7 OS but i am having a little trouble with it.
I followed this guide: http://www.ducea.com/2006/08/01/how-to-enable-ip-forwarding-in-linux/
When I run "cat /proc/sys/net/ipv4/ip_forward", it says 0, telling me what it is NOT allowing forwarding. However, if I run "sudo echo 1 > /proc/sys/net/ipv4/ip_forward", I get an access denied. Additionally, the file seems to be empty? When I did this on ubuntu, I was able to edit the /etc/sysctl.conf file, don't see anything like that on tinycorelinux.
Additionally, since the RPi only has a single interface, I have created a couple subinterfaces like this:
eth0 - 10.0.0.50 /24
eth0:0 - 192.168.10.1 /24
I have also run the following iptable commands (after adding iproute2 package)
sudo iptables --table nat --append POSTROUTING --out-interface eth0:0 -j MASQUERADE
sudo iptables --append FORWARD --in-interface eth0 -j ACCEPT
My DSL router is 192.168.10.2 /24 and I have made a static route from it saying "10.0.0.0 /24 255.255.255.0 192.168.10.1"
I can ping 8.8.8.8 from my RPi but from my desktop (with my IP config being 10.0.0.199 255.255.255.0 10.0.0.50), I get a timed out.
As far as I can tell, all is 100% except that IP forwarding? Also, I need to disable ICMP redirect (which was usually in /etc/sysctl.conf if I was not mistaken) because I want to force the traffic to route between subinterfaces.
I will play with TCP dump, etc. shortly but if someone could tell me how to enable IP forwarding and disable ICMP redirect, I would really appreciate it.
My end goal is:
PC -> RPi (10.0.0.50) -> RPi (192.168.10.1) -> DSL Router (192.168.10.2) -> Internet
Thank you