Bug 14357

Summary: MCC is not able to configure gateway function.
Product: Mageia Reporter: Ole Reier Ulland <ole.reier.ulland>
Component: RPM PackagesAssignee: Mageia Bug Squad <bugsquad>
Status: RESOLVED OLD QA Contact:
Severity: major    
Priority: Normal CC: cooker, eeeemail, jarillon, mageia, rbcourt, thierry.vignaud
Version: 4Keywords: NEEDINFO
Target Milestone: ---   
Hardware: i586   
OS: Linux   
Whiteboard:
Source RPM: drakx-net CVE:
Status comment:

Description Ole Reier Ulland 2014-10-24 00:52:44 CEST
When I want to configure my Mageia 4.1 computer as a gateway to the Internet for my other computers I run into the following problem.

In MCC, âShare the Internet connection with other local machinesâ gives me this error message,

âNo ethernet network adapter configured for LAN has been detected on your system.â

At the same time this is the contents of /etc/shorewall/interfaces,

QUOTE

net     wlp2s3  detect
net     ppp0    detect
loc     enp2s8  detect
loc     enp2s2  detect

END QUOTE

"ppp0" is the name for my mobile internet connection and "enp2s2" is the name for the ethernet connection to the LAN.

This proves that there is something wrong somewhere.

This is not the same bug that is described in, Bug 4678, where the solution is simply to enable one port with shorewall. Back then in February 2012 that may have been the entire problem, but for Mageia 4.1 the problem is much larger. The gateway function is not operational at all.

But there is a temporary solution,

There are three functions needed:
* routing
* NAT
* DNS

Routing and NAT is solved by this script, /usr/local/sbin/routing.sh,

===Start script===
#!/bin/sh
/sbin/iptables -t nat -F
/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE
IPTABLES=/sbin/iptables
#
echo " -  Enabling packet fowarding in the kernel"
echo  "1" > /proc/sys/net/ipv4/ip_forward

echo " - FWD: Allow all connections OUT and only existing and related ones IN"
$IPTABLES -A FORWARD -i enp2s2 -o ppp0 -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i ppp0 -o enp2s2 -j ACCEPT

===End script===

Be aware of line breaks!

run

/usr/local/sbin/routing.sh

DNS is solved by the dnsmasq package,

Install the rpm package "dnsmasq"

run

service dnsmasq start

I hope someone can make a permanent solution that can be accessed in the MCC GUI.

Reproducible: 

Steps to Reproduce:
Johnny A. Solbu 2014-10-24 00:53:01 CEST

CC: (none) => cooker

claire robinson 2014-10-24 10:33:00 CEST

CC: (none) => eeeemail

Comment 1 claire robinson 2014-10-24 10:35:08 CEST
Thierry, Colin could this be related to the new interface naming?

CC: (none) => mageia, thierry.vignaud

Pierre Jarillon 2014-10-24 11:36:09 CEST

CC: (none) => jarillon

Comment 2 Robert Courtright 2014-11-09 17:01:08 CET
Also See Bugs 12542 and 12883

CC: (none) => rbcourt

Comment 3 Thierry Vignaud 2015-03-11 15:58:10 CET
The issue is in http://gitweb.mageia.org/software/drakx-net/tree/bin/drakgw#n126

Can you add the following line before lines 132, 130 & 128?

  use Data::Dumper, warn Dumper $shorewall->{loc_zone};

Then rerun the tool from a terminal and attach (not paste) the resulting /tmp/drakgw.txt file to this bug report
dragw 2>&1|tee /tmp/drakgw.txt

Keywords: (none) => NEEDINFO

Comment 4 Ole Reier Ulland 2015-03-16 12:40:54 CET
To me it looks like I need to be a developer and a package builder to do what you want me to do. I am neither and do not understand the instructions.
Comment 5 Ole Reier Ulland 2015-03-16 13:14:23 CET
However, I have installed Mageia 4.1 on a different computer to take the place of the computer in question here, as a gateway between USB-mobile modem and ethernet with other computers. The result now, after updates, from MCC - âShare the Internet connection with other local machinesâ was that the routing and nat functions work, but "bind" was installed, and that did not work. When I uninstalled "bind" and installed "dnsmasq" in its place the computer started functioning as a gateway without the need of this script.
Comment 6 Ole Reier Ulland 2015-03-16 16:32:51 CET
I also should add that the former computer was a 32-bit and this last one is a 64-bit. I have now done an experiment, I updated the 32-bit computer, removed the script from it, and configured with MCC. It does work as a gateway when I tested with a third computer. But the problem with "bind" persists, I also made sure that the "named" process was running.
Comment 7 Samuel Verschelde 2015-09-21 13:21:30 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Comment 8 Marja Van Waes 2015-10-27 06:58:29 CET
As announced over a month ago, Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer maintained, which means that it will not receive any further security or bug fix updates.

This issue may have been fixed in a later Mageia release, so, if you still see it and didn't already do so: please upgrade to Mageia 5 (or, if you read this much later than this is written: make sure you run a currently maintained Mageia version)

If you are able to reproduce it against a maintained version of Mageia, you are encouraged to 
1. reopen this bug report, by changing the "Status" from "RESOLVED - OLD" to "REOPENED"
2. click on "Version" and change it against that version of Mageia. If you know it's valid in several versions, select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.
3. give as much relevant information as possible. If you're not an experienced bug reporter and have some time: please read this page:
https://wiki.mageia.org/en/How_to_report_a_bug_properly

If you see a similar issue, but are _not_sure_ it is the same, with the same cause, then please file a new bug report and mention this one in it (please include the bug number, too). 


If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].
[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

Status: NEW => RESOLVED
Resolution: (none) => OLD