I need to set up sysctl correctly and I don't think it is obeying my intention.
I am looking at this webpage
https://wiki.gentoo.org/wiki/Home_router#Kernel_setup_.28know_thyself_first.29
FILE /etc/sysctl.conf
net.ipv4.ip_forward = 1
net.ipv4.conf.default.rp_filter = 1
I have this on my file system which did not start packet forwarding
vim /etc/sysctl.d/ipforward.conf
sysctl -w net.ipv4.ip_forward = 1
sysctl -w net.ipv4.conf.all.forwarding = 1
That didn't work. I can pull the sysctl command out maybe but I don't know how to test this.
/etc/init.d/sysctl -vd restart
says nothing about forwarding
What do you get when you run
sysctl -a|grep net.ipv4.ip_forward
However, I'm almost certain you're talking about
NAT/masquerading, which is handled by
iptables.
forwarding packets without masquarading is not that useful. I think I need both.
www3 etc]# sysctl -a|grep net.ipv4.ip_forward
net.ipv4.ip_forward = 1
net.ipv4.ip_forward_use_pmtu = 0
this might be after I fixed it though. I think the problems is how to set it to boot like that?
You need to put the values in /etc/sysctl.conf or in any file inside /etc/sysctl.d/ ending in .conf. The openrc initscript reads them all, giving precedence to the former.