ALT Linux Community general discussions
 help / color / mirror / Atom feed
* [Comm] net.ipv4.ip_forward
@ 2019-12-20 21:09 Stas
  2019-12-20 21:51 ` Vladimir D. Seleznev
  0 siblings, 1 reply; 2+ messages in thread
From: Stas @ 2019-12-20 21:09 UTC (permalink / raw)
  To: ALT Linux Community general discussions

Доброй ночи.

Как нынче правильно нужно указывать включение net.ipv4.ip_forward и
почему он по умолчанию принудительно устанавливается в "0"?

Вписал как описано в man sysctl в файл /etc/sysctl.d/01-forward.conf -
при загрузке не отрабатывает, приходится ручками запускать `sysctl
--system` .

Потом нашёл
https://www.altlinux.org/Etcnet#%D0%9E%D0%B1%D1%89%D0%B8%D0%B5_%D1%81%D0%B2%D0%B5%D0%B4%D0%B5%D0%BD%D0%B8%D1%8F
, где /etc/sysctl.d/ вообще не указан, зато есть /etc/net/sysctl.conf, в
котором есть строка

net.ipv4.ip_forward = 0

IMHO что-то тут неверно. Обрабатываются ли /etc/sysctl.d/*.conf ? Если
да - это нужно отразить в AltWiki

Также нужно либо дополнять man sysctl информацией про etcnet, либо в 
/etc/net/sysctl.conf убирать "net.ipv4.ip_forward = 0" и другие ключевые
параметры в комментарий.


вот что было после перезагрузки:

[root@mail ~]# grep -R forward /etc/sysctl*
/etc/sysctl.d/01-forward.conf:net.ipv4.ip_forward=1

[root@mail ~]# sysctl -a | grep forward
net.ipv4.conf.all.bc_forwarding = 0
net.ipv4.conf.all.forwarding = 0
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.default.bc_forwarding = 0
net.ipv4.conf.default.forwarding = 0
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.ens3.bc_forwarding = 0
net.ipv4.conf.ens3.forwarding = 0
net.ipv4.conf.ens3.mc_forwarding = 0
net.ipv4.conf.lo.bc_forwarding = 0
net.ipv4.conf.lo.forwarding = 0
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.tun0.bc_forwarding = 0
net.ipv4.conf.tun0.forwarding = 0
net.ipv4.conf.tun0.mc_forwarding = 0
net.ipv4.ip_forward = 0
net.ipv4.ip_forward_update_priority = 1
net.ipv4.ip_forward_use_pmtu = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.all.mc_forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.default.mc_forwarding = 0
net.ipv6.conf.ens3.forwarding = 0
net.ipv6.conf.ens3.mc_forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv6.conf.lo.mc_forwarding = 0
net.ipv6.conf.tun0.forwarding = 0
net.ipv6.conf.tun0.mc_forwarding = 0

[root@mail ~]# sysctl --system

[root@mail ~]# sysctl -a | grep forward
net.ipv4.conf.all.bc_forwarding = 0
net.ipv4.conf.all.forwarding = 1
net.ipv4.conf.all.mc_forwarding = 0
net.ipv4.conf.default.bc_forwarding = 0
net.ipv4.conf.default.forwarding = 1
net.ipv4.conf.default.mc_forwarding = 0
net.ipv4.conf.ens3.bc_forwarding = 0
net.ipv4.conf.ens3.forwarding = 1
net.ipv4.conf.ens3.mc_forwarding = 0
net.ipv4.conf.lo.bc_forwarding = 0
net.ipv4.conf.lo.forwarding = 1
net.ipv4.conf.lo.mc_forwarding = 0
net.ipv4.conf.tun0.bc_forwarding = 0
net.ipv4.conf.tun0.forwarding = 1
net.ipv4.conf.tun0.mc_forwarding = 0
net.ipv4.ip_forward = 1
net.ipv4.ip_forward_update_priority = 1
net.ipv4.ip_forward_use_pmtu = 0
net.ipv6.conf.all.forwarding = 0
net.ipv6.conf.all.mc_forwarding = 0
net.ipv6.conf.default.forwarding = 0
net.ipv6.conf.default.mc_forwarding = 0
net.ipv6.conf.ens3.forwarding = 0
net.ipv6.conf.ens3.mc_forwarding = 0
net.ipv6.conf.lo.forwarding = 0
net.ipv6.conf.lo.mc_forwarding = 0
net.ipv6.conf.tun0.forwarding = 0
net.ipv6.conf.tun0.mc_forwarding = 0

-- 
Станислав Дёгтев
Служба "Ваш админ"
 Мои контакты:
 - email: stas.grumbler@gmail.com и stas@vashadmin.su
 - телефоны в Е-бурге +79045430461, +79222112259, +79505571146, +79193628944


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Comm] net.ipv4.ip_forward
  2019-12-20 21:09 [Comm] net.ipv4.ip_forward Stas
@ 2019-12-20 21:51 ` Vladimir D. Seleznev
  0 siblings, 0 replies; 2+ messages in thread
From: Vladimir D. Seleznev @ 2019-12-20 21:51 UTC (permalink / raw)
  To: ALT Linux Community general discussions

On Sat, Dec 21, 2019 at 02:09:49AM +0500, Stas wrote:
> Доброй ночи.
> 
> Как нынче правильно нужно указывать включение net.ipv4.ip_forward и
> почему он по умолчанию принудительно устанавливается в "0"?

Осмелюсь предположить, что вы используете etcnet для управления сетью. В
таком случае вам надо net.ipv4.ip_forward устанавливать в файле
/etc/net/sysctl.conf:

$ grep ip_forward /etc/net/sysctl.conf
net.ipv4.ip_forward = 0

-- 
   С уважением,
   Владимир Селезнев


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-12-20 21:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-20 21:09 [Comm] net.ipv4.ip_forward Stas
2019-12-20 21:51 ` Vladimir D. Seleznev

ALT Linux Community general discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
		mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
	public-inbox-index community

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.community


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git