Bug 2431

Summary: missing simplink in iptables and thats why not working WiFi hotspot mode.
Product: [ROSA-based products] ROSA Fresh Reporter: Stanislav Fomin <stanislav.fomin>
Component: Packages from MainAssignee: ROSA Linux Bugs <bugs>
Status: RESOLVED FIXED QA Contact: ROSA Linux Bugs <bugs>
Severity: normal    
Priority: Normal CC: alexander.kazantsev, denis.silakov, oeai, sergey.sokolov
Version: Fresh   
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Platform: --- ROSA Vulnerability identifier:
RPM Package: iptables-1.4.15-4-rosa2012.1.x86_64 ISO-related:
Bad POT generating: Upstream:

Description Stanislav Fomin 2013-08-01 18:34:25 MSK
Description of problem:
WiFi hotspot mode not working because of bug in iptables package.

Version-Release number of selected component (if applicable):
iptables-1.4.15-4-rosa2012.1.x86_64

How reproducible:
Try ti gnome-network manager hotspot mode.
Create WiFi hotspot. Try to connect. Fail.
Always.


This is because missing simlink in iptables package.
To fix it on PC sufficient:

ln -snf /lib64/iptables.d/linux-2.6-main/ /lib64/iptables
Comment 1 Aleksandr Kazantcev 2013-08-01 18:49:27 MSK
No error in iptables package - see Mageia for example.

We need find what program try find iptables part not in iptables.d directory.
Comment 2 Sergey A. Sokolov 2013-08-01 18:55:39 MSK
#iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
iptables v1.4.15: Couldn't load target `MASQUERADE':No such file or directory

Try `iptables -h' or 'iptables --help' for more information.


# ln -snf /lib64/iptables.d/linux-2.6-main/ /lib64/iptables
# iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
#
Comment 3 Sergey A. Sokolov 2013-08-01 19:02:58 MSK
The wifi hotspot used the iptables MASQUERADE for translate to WAN IP. See the journalctl.
If command with a target '-j MASQUERADE ' fails, then service not working.
Comment 4 Aleksandr Kazantcev 2013-10-12 01:09:40 MSK
If bug still valid?
Comment 5 Denis Silakov 2013-10-15 09:22:49 MSK
Yes, the bug is still valid. /lib/iptables (or /lib64/iptables) symlink is missing and "iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE" fails.

Though it would be nice to test  gnome-network manager hotspot mode.
Comment 6 Aleksandr Kazantcev 2013-10-15 11:23:41 MSK
Try this fix package 

https://abf.rosalinux.ru/build_lists/1353025
https://abf.rosalinux.ru/build_lists/1353026
Comment 7 Stanislav Fomin 2013-10-15 12:26:49 MSK
(In reply to comment #6)
> Try this fix package 
> 
> https://abf.rosalinux.ru/build_lists/1353025
> https://abf.rosalinux.ru/build_lists/1353026

Is it possible to test it in virtualbox or we need real PC?
Comment 8 Denis Silakov 2013-10-15 12:32:32 MSK
In VBox we can only check that symlink is present, but I guess that for real testing of hotspot mode bare hardware is required.
Comment 9 Stanislav Fomin 2013-10-22 03:08:32 MSK
(In reply to comment #6)
> Try this fix package 
> 
> https://abf.rosalinux.ru/build_lists/1353025
> https://abf.rosalinux.ru/build_lists/1353026

[stas@fmp-hp2740p Загрузки]$ urpmi ./iptables-1.4.15-6.src.rpm 
используйте параметр --buildrequires или --install-src (по умолчанию используется --buildrequires)
Пакет lib64nfnetlink-devel-1.0.0-6-rosa2012.1.x86_64 уже установлен

[stas@fmp-hp2740p Загрузки]$ ls -l /lib64/iptables
ls: невозможно получить доступ к /lib64/iptables: Нет такого файла или каталога


FAIL.?
Comment 10 Denis Silakov 2013-10-22 09:53:05 MSK
Why are you installing src.rpm?:)

To update from containers, you should use the following way:

# urpmi.addmedia iptables http://abf-downloads.rosalinux.ru/rosa2012.1/container/1353026/x86_64/main/release/

(container path can be found at the top of build list page)

# urpmi iptables

# urpmi.removemedia iptables
Comment 11 ra oeai 2013-10-30 01:39:28 MSK
i had same error before made symlink with Wifi-Hostapd-AP
also hostapd itself doesn't start nat routing and that's why i've tried the wifi-hostapd and one more error i had with Wifi-Hot was that dnsmasq is not working or wasn't installed. maybe some fixes needed for x64.
Comment 12 ra oeai 2013-10-30 02:22:51 MSK
to fix a dnsmasq error you need to patch CheckProcess.cpp #71 path="var/run/dnsmasq/dnsmasq.pid" it's just a var/run/dnsmasq.pid

+ if not making a symlink
activateap.cpp #128 that calls nat
Comment 13 Denis Silakov 2013-10-30 11:07:52 MSK
(In reply to comment #12)
> to fix a dnsmasq error you need to patch CheckProcess.cpp #71
> path="var/run/dnsmasq/dnsmasq.pid" it's just a var/run/dnsmasq.pid
> 
> + if not making a symlink
> activateap.cpp #128 that calls nat

Thanks, I've merged your patch in ABF and rebuilt wifi-hostapd-ap.
Comment 14 ra oeai 2013-10-30 11:38:52 MSK
there's need of qt4 in requires, but i thought that with qt5 it will work too, just don't know how to set it up properly i think it is different packages in system
Comment 15 Stanislav Fomin 2013-11-18 17:35:48 MSK
(In reply to comment #6)
> Try this fix package 
> 
> https://abf.rosalinux.ru/build_lists/1353025
> https://abf.rosalinux.ru/build_lists/1353026

Test it on 3 laptops.
Inet sharing by ad-hoc WiFi AP works.
Let's push it!
Comment 16 Denis Silakov 2013-11-19 11:45:45 MSK
The updated package has been published.