Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NetworkManager hotspot not working when WPA/WPA2 enabled
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Fri Dec 28, 2018 5:51 pm    Post subject: NetworkManager hotspot not working when WPA/WPA2 enabled Reply with quote

Hello Folks,

I haven't been here since long time a go (in fact after the login, the forum told me: "You last visited on Wed Nov 03, 2010 11:18 pm"). This whole time I've been running Funtoo and I finally made it back to Gentoo since the portage tree is far behind on Funtoo. Good to be back among the Gentoo community.

Anyway, I setup my Gentoo instance using the same hardware and kernel configuration as Funtoo. I managed to get everything to work quite easily except one thing. My hardware is ASUS ROG G752VS-XB78K and the builtin WiFi works just fine under NetworkManager. I am using a second WiFi ASUS USB-N13 which uses RT2870. I usually setup an access point on this WiFi card for my mobile devices and get the internet from the builtin card. My setup was running fine under Funtoo.

Now, whenever I try to plug the device the WiFi hotspot won't be broadcasted and no mobile device is able to see it:

Code:

Dec 28 18:22:13 mamadou-pc NetworkManager[6091]: <info>  [1546017733.5135] wifi-nl80211: (wlan1): using nl80211 for WiFi device control
Dec 28 18:22:13 mamadou-pc NetworkManager[6091]: <info>  [1546017733.5136] device (wlan1): driver supports Access Point (AP) mode
Dec 28 18:22:13 mamadou-pc NetworkManager[6091]: <info>  [1546017733.5139] manager: (wlan1): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/7)
Dec 28 18:22:13 mamadou-pc mtp-probe: checking bus 1, device 10: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Dec 28 18:22:13 mamadou-pc mtp-probe: bus: 1, device: 10 was not an MTP device
Dec 28 18:22:13 mamadou-pc laptop-mode: enabled, not active
Dec 28 18:22:14 mamadou-pc laptop-mode: enabled, not active
Dec 28 18:22:15 mamadou-pc NetworkManager[6091]: <info>  [1546017735.1722] rfkill3: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/ieee80211/phy3/rfkill3) (driver rt2800usb)
Dec 28 18:22:15 mamadou-pc NetworkManager[6091]: <info>  [1546017735.1747] device (wlan1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Dec 28 18:22:15 mamadou-pc mtp-probe: checking bus 1, device 10: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Dec 28 18:22:15 mamadou-pc mtp-probe: bus: 1, device: 10 was not an MTP device
Dec 28 18:22:15 mamadou-pc NetworkManager[6091]: <info>  [1546017735.3106] device (wlan1): set-hw-addr: set MAC address to 5E:A8:4A:AC:9D:92 (scanning)
Dec 28 18:22:15 mamadou-pc NetworkManager[6091]: <info>  [1546017735.4573] sup-iface[0x562717ec8440,wlan1]: supports 4 scan SSIDs
Dec 28 18:22:15 mamadou-pc NetworkManager[6091]: <info>  [1546017735.4581] device (wlan1): supplicant interface state: starting -> ready
Dec 28 18:22:15 mamadou-pc NetworkManager[6091]: <info>  [1546017735.4581] device (wlan1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.6196] policy: auto-activating connection 'Hotspot' (201ec103-e1b9-4805-8c00-4c9bc2ecad9c)
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.6201] device (wlan1): Activation: starting connection 'Hotspot' (201ec103-e1b9-4805-8c00-4c9bc2ecad9c)
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.6202] device (wlan1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.6337] device (wlan1): set-hw-addr: reset MAC address to E0:CB:4E:BD:BF:49 (preserve)
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7638] device (wlan1): supplicant interface state: ready -> disabled
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7639] device (wlan1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7642] device (wlan1): Activation: (wifi) access point 'Hotspot' has security, but secrets are required.
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7642] device (wlan1): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7660] device (wlan1): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7670] device (wlan1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7672] device (wlan1): Activation: (wifi) connection 'Hotspot' has security, and secrets exist.  No new secrets needed.
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7673] Config: added 'ssid' value 'Mamadou'
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7674] Config: added 'mode' value '2'
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7674] Config: added 'frequency' value '2412'
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7674] Config: added 'key_mgmt' value 'WPA-PSK WPA-PSK-SHA256'
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7674] Config: added 'psk' value '<hidden>'
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7674] Config: added 'ieee80211w' value '1'
Dec 28 18:22:16 mamadou-pc NetworkManager[6091]: <info>  [1546017736.7802] device (wlan1): supplicant interface state: disabled -> inactive
Dec 28 18:22:17 mamadou-pc NetworkManager[6091]: <info>  [1546017737.6061] device (wlan1): supplicant interface state: inactive -> disconnected
Dec 28 18:22:17 mamadou-pc ModemManager[6138]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5': not supported by any plugin


If I disable WPA & WPA2 personal and use NONE as encryption it will be broadcasted and mobile devices are able to connect and use the internet:

Code:

Dec 28 18:25:49 mamadou-pc NetworkManager[6091]: <info>  [1546017949.1672] wifi-nl80211: (wlan1): using nl80211 for WiFi device control
Dec 28 18:25:49 mamadou-pc NetworkManager[6091]: <info>  [1546017949.1674] device (wlan1): driver supports Access Point (AP) mode
Dec 28 18:25:49 mamadou-pc NetworkManager[6091]: <info>  [1546017949.1678] manager: (wlan1): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/8)
Dec 28 18:25:49 mamadou-pc mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Dec 28 18:25:49 mamadou-pc mtp-probe: bus: 1, device: 11 was not an MTP device
Dec 28 18:25:49 mamadou-pc laptop-mode: enabled, not active
Dec 28 18:25:50 mamadou-pc laptop-mode: enabled, not active
Dec 28 18:25:50 mamadou-pc NetworkManager[6091]: <info>  [1546017950.8387] rfkill4: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/ieee80211/phy4/rfkill4) (driver rt2800usb)
Dec 28 18:25:50 mamadou-pc NetworkManager[6091]: <info>  [1546017950.8416] device (wlan1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Dec 28 18:25:50 mamadou-pc mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Dec 28 18:25:50 mamadou-pc mtp-probe: bus: 1, device: 11 was not an MTP device
Dec 28 18:25:50 mamadou-pc NetworkManager[6091]: <info>  [1546017950.9833] device (wlan1): set-hw-addr: set MAC address to 7A:33:D3:07:FB:21 (scanning)
Dec 28 18:25:51 mamadou-pc NetworkManager[6091]: <info>  [1546017951.1253] sup-iface[0x562717ec84f0,wlan1]: supports 4 scan SSIDs
Dec 28 18:25:51 mamadou-pc NetworkManager[6091]: <info>  [1546017951.1259] device (wlan1): supplicant interface state: starting -> ready
Dec 28 18:25:51 mamadou-pc NetworkManager[6091]: <info>  [1546017951.1259] device (wlan1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.2832] policy: auto-activating connection 'Hotspot' (201ec103-e1b9-4805-8c00-4c9bc2ecad9c)
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.2838] device (wlan1): Activation: starting connection 'Hotspot' (201ec103-e1b9-4805-8c00-4c9bc2ecad9c)
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.2839] device (wlan1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.3503] device (wlan1): set-hw-addr: reset MAC address to E0:CB:4E:BD:BF:49 (preserve)
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4804] device (wlan1): supplicant interface state: ready -> disabled
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4805] device (wlan1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4807] device (wlan1): Activation: (wifi) connection 'Hotspot' requires no security.  No secrets needed.
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4808] Config: added 'ssid' value 'Mamadou'
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4809] Config: added 'mode' value '2'
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4809] Config: added 'frequency' value '2412'
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4809] Config: added 'key_mgmt' value 'NONE'
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.4942] device (wlan1): supplicant interface state: disabled -> inactive
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6445] device (wlan1): supplicant interface state: inactive -> completed
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6446] device (wlan1): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Started Wi-Fi Hotspot "Mamadou"
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6447] device (wlan1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <error> [1546017952.6524] modprobe: '/sbin/modprobe nf_nat_tftp' exited with error 256 (modprobe: FATAL: Module nf_nat_tftp not found in directory /lib/modules/4.19.12)
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <error> [1546017952.6539] modprobe: '/sbin/modprobe nf_nat_pptp' exited with error 256 (modprobe: FATAL: Module nf_nat_pptp not found in directory /lib/modules/4.19.12)
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <error> [1546017952.6552] modprobe: '/sbin/modprobe nf_nat_h323' exited with error 256 (modprobe: FATAL: Module nf_nat_h323 not found in directory /lib/modules/4.19.12)
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6553] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol tcp --destination-port 53 --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6565] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol udp --destination-port 53 --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6581] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol tcp --destination-port 67 --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6595] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol udp --destination-port 67 --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6610] Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan1 --jump REJECT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6623] Executing: /sbin/iptables --table filter --insert FORWARD --out-interface wlan1 --jump REJECT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6636] Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan1 --out-interface wlan1 --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6649] Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface wlan1 --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6661] Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface wlan1 --match state --state ESTABLISHED,RELATED --jump ACCEPT
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6691] Executing: /sbin/iptables --table nat --insert POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255.255.0 --jump MASQUERADE
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6703] dnsmasq-manager: starting dnsmasq...
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6712] device (wlan1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc dnsmasq[5267]: started, version 2.80 cachesize 150
Dec 28 18:25:52 mamadou-pc dnsmasq[5267]: compile time options: IPv6 GNU-getopt DBus i18n no-IDN DHCP DHCPv6 no-scripts no-TFTP no-conntrack ipset no-auth no-DNSSEC no-ID loop-detect inotify dumpfile
Dec 28 18:25:52 mamadou-pc dnsmasq-dhcp[5267]: DHCP, IP range 10.42.0.10 -- 10.42.0.254, lease time 1h
Dec 28 18:25:52 mamadou-pc dnsmasq[5267]: reading /etc/resolv.conf
Dec 28 18:25:52 mamadou-pc dnsmasq[5267]: using nameserver 172.30.3.254#53
Dec 28 18:25:52 mamadou-pc dnsmasq[5267]: cleared cache
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6726] device (wlan1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6729] device (wlan1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Dec 28 18:25:52 mamadou-pc NetworkManager[6091]: <info>  [1546017952.6837] device (wlan1): Activation: successful, device activated.
Dec 28 18:25:52 mamadou-pc nm-dispatcher: req:3 'up' [wlan1]: new request (1 scripts)
Dec 28 18:25:52 mamadou-pc nm-dispatcher: req:3 'up' [wlan1]: start running ordered scripts...
Dec 28 18:25:53 mamadou-pc ModemManager[6138]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5': not supported by any plugin


In addition to the above log here is my dmesg log:

Code:

[  712.478210] usb 1-5: new high-speed USB device number 15 using xhci_hcd
[  712.623808] usb 1-5: New USB device found, idVendor=0b05, idProduct=1784, bcdDevice= 1.01
[  712.623810] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  712.623811] usb 1-5: Product: 802.11 n WLAN
[  712.623812] usb 1-5: Manufacturer: Ralink
[  712.623812] usb 1-5: SerialNumber: 1.0
[  712.742483] usb 1-5: reset high-speed USB device number 15 using xhci_hcd
[  712.884339] ieee80211 phy8: rt2x00_set_rt: Info - RT chipset 3071, rev 0213 detected
[  712.894154] ieee80211 phy8: rt2x00_set_rf: Info - RF chipset 0008 detected
[  712.894372] ieee80211 phy8: Selected rate control algorithm 'minstrel_ht'
[  714.556298] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  714.556358] ieee80211 phy8: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  714.556396] ieee80211 phy8: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[  714.687296] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  714.827177] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  714.840501] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready


USE flags:

Code:

[ebuild   R    ] net-misc/networkmanager-1.14.4::gentoo  USE="bluetooth connection-sharing consolekit dhclient introspection modemmanager ncurses nss policykit ppp wext wifi -audit -dhcpcd -elogind -gnutls -iwd -json -ofono -ovs -resolvconf (-selinux) -systemd -teamd -test -vala" ABI_X86="(64) -32 (-x32)" 0 KiB
[ebuild   R    ]  net-wireless/wpa_supplicant-2.7::gentoo  USE="dbus hs2-0 qt5 readline ssl -ap -bindist -eap-sim -eapol_test -fasteap -gnutls -libressl -p2p -privsep (-ps3) (-selinux) -smartcard -suiteb -tdls -uncommon-eap-types (-wimax) -wps" 0 KiB


I noticed I'll get the same results with ap disabled or enabled on net-wireless/wpa_supplicant since net-misc/networkmanager manages the connection.

Any ideas?
Back to top
View user's profile Send private message
niku
n00b
n00b


Joined: 23 Dec 2018
Posts: 35

PostPosted: Wed Jan 02, 2019 6:22 am    Post subject: Reply with quote

Do you have hostapd installed? I understand that wpa_supplicant is just the "supplicant" for encrypted wireless connections. (The home page of both the programs https://w1.fi/)

Also, the 'ap' use flag is disabled in wpa_supplicant. Try flipping that. (Perhaps that will pull in hostapd?)

While you are at it, I see that Funtoo recommends 'wps' use flag for wpa_supplicant.
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 12:30 am    Post subject: Reply with quote

niku wrote:
Do you have hostapd installed? I understand that wpa_supplicant is just the "supplicant" for encrypted wireless connections. (The home page of both the programs https://w1.fi/)

Also, the 'ap' use flag is disabled in wpa_supplicant. Try flipping that. (Perhaps that will pull in hostapd?)

While you are at it, I see that Funtoo recommends 'wps' use flag for wpa_supplicant.


Thank you so much for the answer. Since I needed this feature, yesterday I reformatted my hard drive and installed Funtoo again. Since multilib has been dropped in Funtoo I guess I have no choice other than running 32 bits app in a 32-bit chrooted Funtoo.

But, I have a guess. Here is my current setup with Funtoo which works:

emerge -avt wpa_supplicant networkmanager

These are the packages that would be merged, in reverse order:

Code:

Calculating dependencies... done!
[ebuild   R    ] net-misc/networkmanager-1.14.4::net-kit  USE="connection-sharing consolekit dhclient modemmanager ncurses nss ppp resolvconf wext wifi -audit -bluetooth -dhcpcd -elogind -gnutls -introspection -iwd -json -ofono -ovs -policykit (-selinux) (-systemd) -teamd -test -vala" 0 KiB
[ebuild   R    ]  net-wireless/wpa_supplicant-2.6-r8::core-kit  USE="dbus hs2-0 readline ssl -ap -bindist -eap-sim -eapol_test -fasteap -gnutls -libressl -p2p -privsep (-ps3) -qt5 (-selinux) -smartcard -suiteb -tdls -uncommon-eap-types (-wimax) -wps" 0 KiB

Total: 2 packages (2 reinstalls), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No]


As you can see ap USE flag is disabled on net-wireless/wpa_supplicant. And:

Code:

emerge -s hostapd                                                                                     
[ Results for search key : hostapd ]
Searching...

*  net-wireless/hostapd
      Latest version available: 2.6_p20180822
      Latest version installed: [ Not Installed ]
      Size of files: 2,855 KiB
      Homepage:      http://w1.fi
      Description:   IEEE 802.11 wireless LAN Host AP daemon
      License:       BSD

[ Applications found : 1 ]


So, what is different? Why Funtoo works? I found out that the only thing that Funtoo does differently is adding this to package.use (portage suggests that and I have to do etc-update):

Code:

# required by net-misc/networkmanager-1.14.4::net-kit[connection-sharing]
# required by networkmanager (argument)
>=net-dns/dnsmasq-2.80 dbus


The first line says it all. I guess my Gentoo setup was missing that.
Back to top
View user's profile Send private message
niku
n00b
n00b


Joined: 23 Dec 2018
Posts: 35

PostPosted: Thu Jan 03, 2019 1:28 am    Post subject: Reply with quote

USE=connection-sharing emerge -p networkmanager

Code:
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild  N     ] net-dns/dnsmasq-2.80::gentoo  USE="dbus dhcp dumpfile inotify ipv6 nls -auth-dns -conntrack -dhcp-tools -dnssec -id -idn (-libidn2) -lua -script (-selinux) -static -tftp" 490 KiB
[ebuild   R    ] net-misc/networkmanager-1.14.4::gentoo  USE="bluetooth connection-sharing* consolekit dhclient gnutls introspection modemmanager ncurses policykit ppp wext wifi -audit -dhcpcd -elogind (-iwd) -json -nss -ofono -ovs -resolvconf (-selinux) -systemd -teamd -test -vala" ABI_X86="(64) -32 (-x32)" 0 KiB


And
USE="connection-sharing -dbus" emerge -p networkmanager

Code:
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild  N     ] net-dns/dnsmasq-2.80::gentoo  USE="dbus dhcp dumpfile inotify ipv6 nls -auth-dns -conntrack -dhcp-tools -dnssec -id -idn (-libidn2) -lua -script (-selinux) -static -tftp" 490 KiB
[ebuild   R    ] net-misc/networkmanager-1.14.4::gentoo  USE="bluetooth connection-sharing* consolekit dhclient gnutls introspection modemmanager ncurses policykit ppp wext wifi -audit -dhcpcd -elogind (-iwd) -json -nss -ofono -ovs -resolvconf (-selinux) -systemd -teamd -test -vala" ABI_X86="(64) -32 (-x32)" 0 KiB

Total: 2 packages (1 new, 1 reinstall), Size of downloads: 490 KiB

The following USE changes are necessary to proceed:
 (see "package.use" in the portage(5) man page for more details)
# required by net-misc/networkmanager-1.14.4::gentoo[connection-sharing]
# required by @selected
# required by @world (argument)
>=net-dns/dnsmasq-2.80 dbus

This is strange then. If you had -dbus globally, why did gentoo too not complain for you (as funtoo does)?
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 11:07 am    Post subject: Reply with quote

Thanks for testing that out. Unfortunately, I don't have access to that setup any more since I formatted it. But, I kept my Gentoo's package.use and there is no sign of the mentioned line. I choose the Desktop profile for Gentoo, too which I guess as you mentioned might have even enabled dbus globally.
Back to top
View user's profile Send private message
niku
n00b
n00b


Joined: 23 Dec 2018
Posts: 35

PostPosted: Thu Jan 03, 2019 11:19 am    Post subject: Reply with quote

So, the Gentoo profile must have enabled dbus globally, while the Funtoo profile does not do it. In other words, in Gentoo, emerge didn't ask you to enable the flag because it is enabled for all packages by default. So, this lead can be dismissed.
Back to top
View user's profile Send private message
niku
n00b
n00b


Joined: 23 Dec 2018
Posts: 35

PostPosted: Thu Jan 03, 2019 11:37 am    Post subject: Reply with quote

Another difference:

In Funtoo, networkmanager gets built with the resolvconf flag, while in Gentoo it doesn't.

Resolvconf does seem very interesting:

quse -D resolvconf
Code:

 local:resolvconf:net-misc/networkmanager: Use net-dns/openresolv for managing DNS information in /etc/resolv.conf ...


So the flag pulls in openresolv to manage the DNS information, which seems to be what you need too. Quote from its homepage:
Quote:
/etc/resolv.conf is a file that holds the configuration for the local resolution of domain names. Normally this file is either static or maintained by a local daemon, normally a DHCP daemon. But what happens if more than one thing wants to control the file? Say you have wired and wireless interfaces to different subnets and run a VPN or two on top of that, how do you say which one controls the file? It's also not as easy as just adding and removing the nameservers each client knows about as different clients could add the same nameservers.


Last edited by niku on Thu Jan 03, 2019 11:41 am; edited 1 time in total
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 11:41 am    Post subject: Reply with quote

niku wrote:
So, the Gentoo profile must have enabled dbus globally, while the Funtoo profile does not do it. In other words, in Gentoo, emerge didn't ask you to enable the flag because it is enabled for all packages by default. So, this lead can be dismissed.


I am not sure, I'm just guessing enabling Gentoo's Desktop profile should enable dbus. On Funtoo, it has a tool called epro. I decided to not enable the Desktop flavor (similar to Gentoo profiles) and emerge networkmanager so that's why it suggested dbus use flag. For example if I emerge nvidia-drivers using the minimal flavor, portage suggests X USE flag. But, if I enable Desktop flavor since X is globally enabled it won't suggest anything.
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 11:42 am    Post subject: Reply with quote

niku wrote:
Another difference:

In Funtoo, networkmanager gets built with the resolvconf flag, while in Gentoo it doesn't.

Resolvconf does seem very interesting:

quse -D resolvconf
Code:

 local:resolvconf:net-misc/networkmanager: Use net-dns/openresolv for managing DNS information in /etc/resolv.conf ...


So the flag pulls in openresolv to manage the DNS information, which seems to be what you need too. Quote from its homepage:
Quote:
/etc/resolv.conf is a file that holds the configuration for the local resolution of domain names. Normally this file is either static or maintained by a local daemon, normally a DHCP daemon. But what happens if more than one thing wants to control the file? Say you have wired and wireless interfaces to different subnets and run a VPN or two on top of that, how do you say which one controls the file? It's also not as easy as just adding and removing the nameservers each client knows about as different clients could add the same nameservers.


Maybe that's another possibility. Thanks for figuring it out!
Back to top
View user's profile Send private message
niku
n00b
n00b


Joined: 23 Dec 2018
Posts: 35

PostPosted: Thu Jan 03, 2019 11:56 am    Post subject: Reply with quote

By the way, I am curious about why you start installations anew. Why not take a full tar backup of / and store it somewhere? When you need it, you just untar it*, and voila, you have a full working system!

*I did this recently, and I just had to update /etc/fstab (to point out the partitions I wanted to be mounted as / and /home), and grub.cfg (to point out the path of the new kernel -- my grub resides on a separate partition).
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 12:34 pm    Post subject: Reply with quote

niku wrote:
By the way, I am curious about why you start installations anew. Why not take a full tar backup of / and store it somewhere? When you need it, you just untar it*, and voila, you have a full working system!

*I did this recently, and I just had to update /etc/fstab (to point out the partitions I wanted to be mounted as / and /home), and grub.cfg (to point out the path of the new kernel -- my grub resides on a separate partition).


Well, TBH I do that all the time with my both FreeBSD, and Linux boxes (tar cvJpf) and restore from that. But, what made me switch back to Funtoo was dealing with USE flags. I installed my Gentoo and two days later I do emerge --sync and emerge -auDN @world which causes portage to complain that some packages need >=OpenSSL-1.1.0 and others <OpenSSL-1.1.0 which I couldn't figure out how to resolve. I did a google search and found many recent threads dealing with the same issue. On Funtoo I don't have to deal with USE flags anymore (at least not too often). Yes Gentoo's portage is more recent and up to date, but IMHO Funtoo's Portage has a higher quality (I understood that by spending my time on switch between Funtoo/Gentoo in the past two weeks). Furthermore, if I need newer ebuilds I could get them from Gentoo's Portage Tree and add them to my own local overlay. The only annoying thing with Funtoo is that they dropped multilib support in the past month. So, I should run a chrooted 32-bit Funtoo for my win32 apps running on Wine. Which thanks to Gentoo docs https://wiki.gentoo.org/wiki/Project:AMD64/32-bit_Chroot_Guide I figured out how.

I appreciate Gentoo and Funtoo together. Funtoo, enables me to focus on my day to day stuff without getting lost dealing with USE flags while bringing the power of Gentoo to my PC. On the other hand Gentoo is well documented (far better than Funtoo) and I could use both the documentation and Gentoo's portage tree whenever I'm in need of them.
Back to top
View user's profile Send private message
niku
n00b
n00b


Joined: 23 Dec 2018
Posts: 35

PostPosted: Thu Jan 03, 2019 1:28 pm    Post subject: Reply with quote

Thanks for the detailed reply. I intend to try out Funtoo in a while!

---

Could you post the relevant syslog fragment from Funtoo (when using WPA2)? It could help someone!
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 9:20 pm    Post subject: Reply with quote

niku wrote:
Thanks for the detailed reply. I intend to try out Funtoo in a while!


You're welcome! :)
Back to top
View user's profile Send private message
NuLL3rr0r
n00b
n00b


Joined: 13 Jul 2009
Posts: 13

PostPosted: Thu Jan 03, 2019 9:29 pm    Post subject: Reply with quote

niku wrote:
Could you post the relevant syslog fragment from Funtoo (when using WPA2)? It could help someone!


OK, here is system's log:

Code:

Jan  3 22:25:22 localhost NetworkManager[5810]: <info>  [1546550722.9294] wifi-nl80211: (wlan1): using nl80211 for WiFi device control
Jan  3 22:25:22 localhost NetworkManager[5810]: <info>  [1546550722.9295] device (wlan1): driver supports Access Point (AP) mode
Jan  3 22:25:22 localhost NetworkManager[5810]: <info>  [1546550722.9301] manager: (wlan1): new 802.11 WiFi device (/org/freedesktop/NetworkManager/Devices/6)
Jan  3 22:25:22 localhost mtp-probe: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Jan  3 22:25:22 localhost mtp-probe: bus: 1, device: 6 was not an MTP device
Jan  3 22:25:22 localhost laptop-mode: enabled, not active
Jan  3 22:25:23 localhost laptop-mode: enabled, not active
Jan  3 22:25:24 localhost NetworkManager[5810]: <info>  [1546550724.5323] rfkill2: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/ieee80211/phy2/rfkill2) (driver rt2800usb)
Jan  3 22:25:24 localhost NetworkManager[5810]: <info>  [1546550724.5334] device (wlan1): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jan  3 22:25:24 localhost mtp-probe: checking bus 1, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5"
Jan  3 22:25:24 localhost mtp-probe: bus: 1, device: 6 was not an MTP device
Jan  3 22:25:24 localhost NetworkManager[5810]: <info>  [1546550724.6735] device (wlan1): set-hw-addr: set MAC address to C6:20:45:52:64:67 (scanning)
Jan  3 22:25:24 localhost NetworkManager[5810]: <info>  [1546550724.8259] sup-iface[0x55f3f39b0390,wlan1]: supports 4 scan SSIDs
Jan  3 22:25:24 localhost NetworkManager[5810]: <info>  [1546550724.8266] device (wlan1): supplicant interface state: starting -> ready
Jan  3 22:25:24 localhost NetworkManager[5810]: <info>  [1546550724.8266] device (wlan1): state change: unavailable -> disconnected (reason 'supplicant-available', sys-iface-state: 'managed')
Jan  3 22:25:25 localhost NetworkManager[5810]: <info>  [1546550725.9892] policy: auto-activating connection 'Hotspot' (a09c09b7-76c1-4e7b-aef9-aa8b115767fc)
Jan  3 22:25:25 localhost NetworkManager[5810]: <info>  [1546550725.9899] device (wlan1): Activation: starting connection 'Hotspot' (a09c09b7-76c1-4e7b-aef9-aa8b115767fc)
Jan  3 22:25:25 localhost NetworkManager[5810]: <info>  [1546550725.9900] device (wlan1): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.0560] device (wlan1): set-hw-addr: reset MAC address to E0:CB:4E:BD:BF:49 (preserve)
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1869] device (wlan1): supplicant interface state: ready -> disabled
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1870] device (wlan1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1873] device (wlan1): Activation: (wifi) access point 'Hotspot' has security, but secrets are required.
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1873] device (wlan1): state change: config -> need-auth (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1889] device (wlan1): state change: need-auth -> prepare (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1896] device (wlan1): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1898] device (wlan1): Activation: (wifi) connection 'Hotspot' has security, and secrets exist.  No new secrets needed.
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1899] Config: added 'ssid' value 'Mamadou'
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1899] Config: added 'mode' value '2'
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1899] Config: added 'frequency' value '2412'
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1899] Config: added 'key_mgmt' value 'WPA-PSK'
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.1899] Config: added 'psk' value '<hidden>'
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.2008] device (wlan1): supplicant interface state: disabled -> inactive
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3540] device (wlan1): supplicant interface state: inactive -> completed
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3540] device (wlan1): Activation: (wifi) Stage 2 of 5 (Device Configure) successful. Started Wi-Fi Hotspot "Mamadou"
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3542] device (wlan1): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <error> [1546550726.3626] modprobe: '/sbin/modprobe nf_nat_tftp' exited with error 256 (modprobe: FATAL: Module nf_nat_tftp not found in directory /lib/modules/4.19.13)
Jan  3 22:25:26 localhost NetworkManager[5810]: <error> [1546550726.3639] modprobe: '/sbin/modprobe nf_nat_pptp' exited with error 256 (modprobe: FATAL: Module nf_nat_pptp not found in directory /lib/modules/4.19.13)
Jan  3 22:25:26 localhost NetworkManager[5810]: <error> [1546550726.3651] modprobe: '/sbin/modprobe nf_nat_h323' exited with error 256 (modprobe: FATAL: Module nf_nat_h323 not found in directory /lib/modules/4.19.13)
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3652] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol tcp --destination-port 53 --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3666] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol udp --destination-port 53 --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3681] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol tcp --destination-port 67 --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3697] Executing: /sbin/iptables --table filter --insert INPUT --in-interface wlan1 --protocol udp --destination-port 67 --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3712] Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan1 --jump REJECT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3725] Executing: /sbin/iptables --table filter --insert FORWARD --out-interface wlan1 --jump REJECT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3738] Executing: /sbin/iptables --table filter --insert FORWARD --in-interface wlan1 --out-interface wlan1 --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3751] Executing: /sbin/iptables --table filter --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface wlan1 --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3762] Executing: /sbin/iptables --table filter --insert FORWARD --destination 10.42.0.0/255.255.255.0 --out-interface wlan1 --match state --state ESTABLISHED,RELATED --jump ACCEPT
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3789] Executing: /sbin/iptables --table nat --insert POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination 10.42.0.0/255.255.255.0 --jump MASQUERADE
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3802] dnsmasq-manager: starting dnsmasq...
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3811] device (wlan1): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost dnsmasq[8044]: started, version 2.80 cachesize 150
Jan  3 22:25:26 localhost dnsmasq[8044]: compile time options: IPv6 GNU-getopt DBus i18n no-IDN DHCP DHCPv6 no-scripts no-TFTP no-conntrack ipset no-auth no-DNSSEC no-ID loop-detect inotify dumpfile
Jan  3 22:25:26 localhost dnsmasq-dhcp[8044]: DHCP, IP range 10.42.0.10 -- 10.42.0.254, lease time 1h
Jan  3 22:25:26 localhost dnsmasq[8044]: reading /etc/resolv.conf
Jan  3 22:25:26 localhost dnsmasq[8044]: using nameserver 172.30.3.254#53
Jan  3 22:25:26 localhost dnsmasq[8044]: cleared cache
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3821] device (wlan1): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3824] device (wlan1): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jan  3 22:25:26 localhost NetworkManager[5810]: <info>  [1546550726.3930] device (wlan1): Activation: successful, device activated.
Jan  3 22:25:26 localhost dbus-daemon[5691]: [system] Activating service name='org.freedesktop.nm_dispatcher' requested by ':1.2' (uid=0 pid=5810 comm="/usr/sbin/NetworkManager --pid-file /run/NetworkMa" label="kernel") (using servicehelper)
Jan  3 22:25:26 localhost dbus-daemon[5691]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Jan  3 22:25:26 localhost nm-dispatcher: req:1 'up' [wlan1]: new request (1 scripts)
Jan  3 22:25:26 localhost nm-dispatcher: req:1 'up' [wlan1]: start running ordered scripts...
Jan  3 22:25:27 localhost ModemManager[5857]: <info>  Couldn't check support for device '/sys/devices/pci0000:00/0000:00:14.0/usb1/1-5': not supported by any plugin


And also dmesg when I connect the external USB WiFi:

Code:

[  542.970254] usb 1-5: new high-speed USB device number 6 using xhci_hcd
[  543.115843] usb 1-5: New USB device found, idVendor=0b05, idProduct=1784, bcdDevice= 1.01
[  543.115845] usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  543.115846] usb 1-5: Product: 802.11 n WLAN
[  543.115846] usb 1-5: Manufacturer: Ralink
[  543.115847] usb 1-5: SerialNumber: 1.0
[  543.233513] usb 1-5: reset high-speed USB device number 6 using xhci_hcd
[  543.374630] ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 3071, rev 0213 detected
[  543.384364] ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 0008 detected
[  543.384603] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
[  544.989504] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  544.989543] ieee80211 phy2: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  544.989564] ieee80211 phy2: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[  545.121271] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  545.264344] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  545.282811] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  546.642123] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  546.797825] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
[  546.809286] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum