On Tue, 2018-02-20 at 21:00 +0100, Belisko Marek wrote:
> Hi,
> 
> I'm trying to configure hotspot by using this command:
> nmcli dev wifi hotspot ifname wlan0 ssid test password "test1234"
> 
> on orangepi which is using realtek wifi (out of tree driver). When
> want to setup simple hotspot it looks like there are soe mtroubles
> with iptbles + dnsmasq. Any ideas what can cause this issue? Thanks

Your analysis looks correct.  What happens when you run the iptables
command manually?

/usr/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

does /usr/sbin/iptables exist?

does your kernel have the ipt_MASQUERADE, iptable_nat, nf_conntrack,
iptable_mangle, and other modules like that available?

Dan

> Log:
> IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3228] keyfile: add connection in-memory
> (13e514a4-5c21-43ec-9658-d2d80738bac7,"Hotspot")
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3308] device (wlan0): Activation: starting
> connection 'Hotspot' (13e514a4-5c21-43ec-9658-d2d80738bac7)
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3343] keyfile: update
> /etc/NetworkManager/system-connections/Hotspot
> (13e514a4-5c21-43ec-9658-d2d80738bac7,"Hotspot") and persist
> connection
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3351] audit: op="connection-add-activate"
> uuid="13e514a4-5c21-43ec-9658-d2d80738bac7" name="Hotspot" pid=1384
> uid=0 result="success"
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3416] device (wlan0): state change: disconnected
> -> prepare (reason 'none') [30 40 0]
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3426] manager: NetworkManager state is now
> CONNECTING
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.3726] device (wlan0): set-hw-addr: set-cloned MAC
> address to 12:81:76:EA:FC:D0 (permanent)
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4096] device (wlan0): state change: prepare ->
> config (reason 'none') [40 50 0]
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4111] device (wlan0): Activation: (wifi) access
> point 'Hotspot' has security, but secrets are required.
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4113] device (wlan0): state change: config ->
> need-auth (reason 'none') [50 60 0]
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4386] device (wlan0): supplicant interface state:
> inactive -> disconnected
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4392] device (wlan0): supplicant interface state:
> disconnected -> inactive
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4666] device (wlan0): state change: need-auth ->
> prepare (reason 'none') [60 40 0]
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4746] device (wlan0): state change: prepare ->
> config (reason 'none') [40 50 0]
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4759] device (wlan0): Activation: (wifi)
> connection 'Hotspot' has security, and secrets exist.  No new secrets
> needed.
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4763] Config: added 'ssid' value 'test'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4765] Config: added 'mode' value '2'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4766] Config: added 'frequency' value '2412'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4767] Config: added 'key_mgmt' value 'WPA-PSK'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4768] Config: added 'psk' value '<omitted>'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4769] Config: added 'proto' value 'RSN'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4770] Config: added 'pairwise' value 'CCMP'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4771] Config: added 'group' value 'CCMP'
> Feb 20 19:55:47 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156547.4983] sup-iface[0x259368,wlan0]: config: set
> interface ap_scan to 2
> IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.3471] device (wlan0): supplicant interface state:
> inactive -> completed
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.3473] device (wlan0): Activation: (wifi) Stage 2
> of 5 (Device Configure) successful.  Started Wi-Fi Hotspot 'test'.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.3483] device (wlan0): state change: config ->
> ip-config (reason 'none') [50 70 0]
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.4330] Executing: /usr/sbin/iptables --table
> filter
> --insert INPUT --in-interface wlan0 --protocol tcp --destination-port
> 53 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.4502] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.4506] Executing: /usr/sbin/iptables --table
> filter
> --insert INPUT --in-interface wlan0 --protocol udp --destination-port
> 53 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.4682] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.infoIPv6: ADDRCONF(NETDEV_UP):
> wlan0: link is not ready
>  NetworkManager[1375]: <info>  [1519156548.4686] Executing:
> /usr/sbin/iptables --table filter --insert INPUT --in-interface wlan0
> --protocol tcp --destination-port 67 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.4858] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.4861] Executing: /usr/sbin/iptables --table
> filter
> --insert INPUT --in-interface wlan0 --protocol udp --destination-port
> 67 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.5040] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.5043] Executing: /usr/sbin/iptables --table
> filter
> --insert FORWARD --in-interface wlan0 --jump REJECT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.5202] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.5205] Executing: /usr/sbin/iptables --table
> filter
> --insert FORWARD --out-interface wlan0 --jump REJECT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.5366] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.5369] Executing: /usr/sbin/iptables --table
> filter
> --insert FORWARD --in-interface wlan0 --out-interface wlan0 --jump
> ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.5529] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.5532] Executing: /usr/sbin/iptables --table
> filter
> --insert FORWARD --source 10.42.0.0/255.255.255.0 --in-interface
> wlan0
> --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.5693] ** Command returned exit status 3.
> Error: Connection activation failed: (5) IP configuration could not
> be
> reserved (no available address, timeout, etc.).
> root@orange-pi-pc-plus:~# Feb 20 19:55:48 orange-pi-pc-plus user.info
> NetworkManager[1375]: <info>  [1519156548.5697] Executing:
> /usr/sbin/iptables --table filter --insert FORWARD --destination
> 10.42.0.0/255.255.255.0 --out-interface wlan0
>  --match state --state ESTABLISHED,RELATED --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.5965] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.5968] Executing: /usr/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 MASQ
> UERADE
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.6098] ** Command returned exit status 1.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6105] dnsmasq-manager: starting dnsmasq...
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6158] device (wlan0): state change: ip-config ->
> ip-check (reason 'none') [70 80 0]
> Feb 20 19:55:48 orange-pi-pc-plus daemon.info NetworkManager[1375]:
> dnsmasq: failed to create listening socket for 10.42.0.1: Address
> already in use
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.6228] dnsmasq-manager: dnsmasq exited with error:
> Network access problem (address in use, permissions) (2)
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6230] device (wlan0): state change: ip-check ->
> failed (reason 'ip-config-unavailable') [80 120 5]
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6243] manager: NetworkManager state is now
> DISCONNECTED
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.6283] device (wlan0): Activation: failed for
> connection 'Hotspot'
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6534] device (wlan0): state change: failed ->
> disconnected (reason 'none') [120 30 0]
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6771] device (wlan0): set-hw-addr: set MAC
> address
> to C6:38:4F:E7:AC:F6 (scanning)
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.6940] Executing: /usr/sbin/iptables --table nat
> --delete POSTROUTING --source 10.42.0.0/255.255.255.0 ! --destination
> 10.42.0.0/255.255.255.0 --jump MASQ
> UERADE
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.7060] ** Command returned exit status 1.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.7063] Executing: /usr/sbin/iptables --table
> filter
> --delete FORWARD --destination 10.42.0.0/255.255.255.0 --out-
> interface
> wlan0 --match state --state EST
> ABLISHED,RELATED --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.7426] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.7428] Executing: /usr/sbin/iptables --table
> filter
> --delete FORWARD --source 10.42.0.0/255.255.255.0 --in-interface
> wlan0
> --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.7610] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.7613] Executing: /usr/sbin/iptables --table
> filter
> --delete FORWARD --in-interface wlan0 --out-interface wlan0 --jump
> ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.7786] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.7788] Executing: /usr/sbin/iptables --table
> filter
> --delete FORWARD --out-interface wlan0 --jump REJECT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.7959] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.7962] Executing: /usr/sbin/iptables --table
> filter
> --delete FORWARD --in-interface wlan0 --jump REJECT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.8133] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.8137] Executing: /usr/sbin/iptables --table
> filter
> --delete INPUT --in-interface wlan0 --protocol udp --destination-port
> 67 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.8324] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.8327] Executing: /usr/sbin/iptables --table
> filter
> --delete INPUT --in-interface wlan0 --protocol tcp --destination-port
> 67 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.8518] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.8522] Executing: /usr/sbin/iptables --table
> filter
> --delete INPUT --in-interface wlan0 --protocol udp --destination-port
> 53 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.8709] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.8712] Executing: /usr/sbin/iptables --table
> filter
> --delete INPUT --in-interface wlan0 --protocol tcp --destination-port
> 53 --jump ACCEPT
> Feb 20 19:55:48 orange-pi-pc-plus user.warn NetworkManager[1375]:
> <warn>  [1519156548.8896] ** Command returned exit status 3.
> Feb 20 19:55:48 orange-pi-pc-plus user.info NetworkManager[1375]:
> <info>  [1519156548.8929] device (wlan0): supplicant interface state:
> completed -> disconnected
> 
> BR,
> 
> marek
> 
_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to