Artix Linux Forum

Artix Linux => System => Topic started by: mrbrklyn on 21 December 2018, 20:31:48

Title: sysctl set up
Post by: mrbrklyn on 21 December 2018, 20:31:48
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

Code: [Select]
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

Code: [Select]
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

Title: Re: sysctl set up
Post by: nous on 28 December 2018, 12:58:11
What do you get when you run
Code: [Select]
sysctl -a|grep net.ipv4.ip_forward

However, I'm almost certain you're talking about NAT/masquerading, which is handled by iptables.
Title: Re: sysctl set up
Post by: mrbrklyn on 28 December 2018, 18:06:10
What do you get when you run
Code: [Select]
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.
Title: Re: sysctl set up
Post by: mrbrklyn on 28 December 2018, 18:09:23
What do you get when you run
Code: [Select]
sysctl -a|grep net.ipv4.ip_forward

However, I'm almost certain you're talking about NAT/masquerading, which is handled by iptables.


Code: [Select]
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?

Title: Re: sysctl set up
Post by: nous on 30 December 2018, 19:31:25
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.