Bug 26120 - ip_forward=1 not set permanently for share network connection, drakgw nat masq
Summary: ip_forward=1 not set permanently for share network connection, drakgw nat masq
Status: NEW
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: 9
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Base system maintainers
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-22 22:13 CET by Yves DEMUR
Modified: 2023-09-20 23:43 CEST (History)
3 users (show)

See Also:
Source RPM: initscripts-9.78-10.mga7.src.rpm
CVE:
Status comment:


Attachments
/etc/sysconfig/network of Mageia7 (7.41 KB, text/plain)
2020-01-22 22:15 CET, Yves DEMUR
Details
/etc/sysconfig/network of Mageia6 (7.79 KB, text/plain)
2020-01-22 22:16 CET, Yves DEMUR
Details

Description Yves DEMUR 2020-01-22 22:13:01 CET
Description of problem:
With FORWARD_IPV4=true in /etc/sysconfig/network, /proc/sys/net/ipv4/ip_forward is not set to 1 after restart of network.service


How reproducible:

Configure your Mageia PC to act as a gateway :
https://wiki.mageia.org/en/Howto_use_NAT_to_share_your_connection
Or use #drakgw (or ControlCenter/Networking/ShareConnexion)
Check in /etc/shorewall/interfaces the zone "loc" of the subnetwork NIC

Restart network
#systemctl restart network

Try internet acces on client device => not working
On gateway type #sysctl -w net.ipv4.ip_forward=1
Try internet acces on client device => working


Explanation :
After a
#systemctl restart network
Test ip forwarding
#cat /proc/sys/net/ipv4/ip_forward
-> 0
Check parameter
#grep FORWARD_IPV4 /etc/sysconfig/network
-> FORWARD_IPV4=true
This parameter is not used by /etc/rc.d/init.d/network
This script has been changed since Mageia6 : the block
        # depreciated but we still use it.
        if [ -f /proc/sys/net/ipv4/ip_forward ] && [[ "$FORWARD_IPV4" = "yes" || "$FORWARD_IPV4" = "true" ]]; 
            then
                action "Enabling IPv4 packet forwarding" sysctl -w net.ipv4.ip_forward=1
        fi
has been removed.
I have re-installed it after the "./ifup ifcfg-lo" block, and got network sharing work again after restart of service network.

The initial /etc/rc.d/init.d/network sets to 0 /proc/sys/net/ipv4/ip_forward at stop, but dont set it to 1 at start
Comment 1 Yves DEMUR 2020-01-22 22:15:23 CET
Created attachment 11476 [details]
/etc/sysconfig/network of Mageia7
Comment 2 Yves DEMUR 2020-01-22 22:16:28 CET
Created attachment 11477 [details]
/etc/sysconfig/network of Mageia6
Comment 3 Lewis Smith 2020-01-23 20:00:01 CET
Thank you for the report and your research.

initscripts is committed by different people, so assigning this to the base system group.

Assignee: bugsquad => basesystem

Florian Hubold 2020-04-01 17:42:06 CEST

CC: (none) => doktor5000

Comment 4 Ricardo Naranjo 2020-09-03 23:02:08 CEST
I have the same behaviour with an adittional issue.

I have a "real" IP address into my mageia ethernet device connected to internet (190.146.0.0/16 network).

After ran the drakgw I had to do the following in order to make things happen:

1- To write an 1 into ip_forward:
echo 1 > /proc/sys/net/ipv4/ip_forward

2- To add the acl of my network to squid configuration file:
18a19
> acl real_ip_net  src 190.146.0.0/16
39a41
> http_access allow real_ip_net


After that everything begin to work smooth and nicely.

CC: (none) => gramo.gnu

Comment 5 Aurelien Oudelet 2021-07-06 13:16:50 CEST
Mageia 7 is EOL since July 1st 2021.
There will not have any further bugfix for this release.

You are encouraged to upgrade to Mageia 8 as soon as possible.

@reporter, if this bug still apply with Mageia 8, please let us know it.

@packager, if you work on the Mageia 7 version of your package, please check the Mageia 8 package if issue is also present. In this case, please fix the Mageia 8 version instead.

This bug report will be closed OLD if there is no further notice within 1st September 2021.
Comment 6 Ricardo Naranjo 2021-07-06 16:00:09 CEST
Bonjour Aurelien

Yes, this bug still apply with Mageia 8. I reported since Mageia 4, I think.

I use Mageia Live Gnome version, but I think it happens with all versions.
Marja Van Waes 2021-07-06 16:55:48 CEST

Version: 7 => 8
CC: (none) => marja11

Comment 7 Florian Hubold 2023-09-20 23:43:23 CEST
(In reply to Ricardo Naranjo from comment #6)

> Yes, this bug still apply with Mageia 8. I reported since Mageia 4, I think.

Somebody in forums confirmed that this issue still applies for Mageia 9.

Version: 8 => 9


Note You need to log in before you can comment on or make changes to this bug.