You are not logged in.

#1 2013-05-31 11:55:15

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Internet share stops working randomly [SOLVED]

I am using a mobile broadband usb device to connect to the internet and I am sharing that connection with other devices from a router. Here is a diagram:

WWAN --> archlinux computer --> wlan0 --> router --> other devices

I remember being able to get this to work by simply going to the networkmanager GUI menu in xfce4 and clicking "shared with other computers" for that connection to the router. Recently it stopped working and I haven't been able to pinpoint exactly why.

Here is the output of "ip a":

$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
    link/ether 00:1f:16:a5:7c:3e brd ff:ff:ff:ff:ff:ff
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
    link/ether 00:25:56:60:91:4b brd ff:ff:ff:ff:ff:ff
    inet6 fe80::225:56ff:fe60:914b/64 scope link 
       valid_lft forever preferred_lft forever
11: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 3
    link/ppp 
    inet 75.255.16.18 peer 66.174.185.64/32 brd 75.255.16.18 scope global ppp0
       valid_lft forever preferred_lft forever

Last edited by rg_arc (2013-06-08 10:36:23)

Offline

#2 2013-06-01 09:28:55

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Internet share stops working randomly [SOLVED]

I have iptables setup but recently found out that the iptables.rules file was empty. Here is the new setup again, but I am still having trouble getting the connection to share to the router.

# Generated by iptables-save v1.4.18 on Fri May 31 06:31:48 2013
*nat
:PREROUTING ACCEPT [3:297]
:INPUT ACCEPT [3:297]
:OUTPUT ACCEPT [4:208]
:POSTROUTING ACCEPT [4:208]
-A POSTROUTING -o internet0 -j MASQUERADE
COMMIT
# Completed on Fri May 31 06:31:48 2013

Here is the output of a section of /var/log/everything.log to get a better idea of what is going on:

dnsmasq[1628]: started, version 2.66 cachesize 150
dnsmasq[1628]: compile time options: IPv6 GNU-getopt DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth
dnsmasq-dhcp[1628]: DHCP, IP range 10.42.0.10 -- 10.42.0.100, lease time 1h
dnsmasq[1628]: reading /etc/resolv.conf
dnsmasq[1628]: using nameserver 8.8.8.8#53
dnsmasq[1628]: using nameserver 198.224.159.135#53
dnsmasq[1628]: using nameserver 198.224.158.135#53
dnsmasq[1628]: cleared cache
NetworkManager[1590]: <info> (wlan0): roamed from BSSID C0:3F:0E:56:7D:DE (ominous) to C0:3F:0E:56:7D:DE (ominous)
NetworkManager[1590]: <info> Activation (wlan0) successful, device activated.
NetworkManager[1590]: <info> Auto-activating connection 'Verizon connection'.
NetworkManager[1590]: <info> Activation (ttyUSB0) starting connection 'Verizon connection'

And this is the output of the dnsmasq service from systemd:

 sudo systemctl status dnsmasq
dnsmasq.service - A lightweight DHCP and caching DNS server
   Loaded: loaded (/usr/lib/systemd/system/dnsmasq.service; enabled)
   Active: active (running) since Sat 2013-06-01 04:39:30 CDT; 1h 11min ago
     Docs: man:dnsmasq(8)
 Main PID: 2098 (dnsmasq)
   CGroup: name=systemd:/system/dnsmasq.service
           └─2098 /usr/bin/dnsmasq -k --enable-dbus --user=dnsmasq --pid-file

Jun 01 04:41:20 rg_arch dnsmasq[2098]: using nameserver 198.224.158.135#53
Jun 01 04:44:19 rg_arch systemd[1]: Started A lightweight DHCP and caching DNS server.
Jun 01 05:48:49 rg_arch dnsmasq[2098]: reading /etc/resolv.conf
Jun 01 05:48:49 rg_arch dnsmasq[2098]: using nameserver 8.8.8.8#53
Jun 01 05:48:49 rg_arch dnsmasq[2098]: using nameserver 198.224.159.135#53
Jun 01 05:48:49 rg_arch dnsmasq[2098]: using nameserver 198.224.158.135#53
Jun 01 05:50:07 rg_arch dnsmasq[2098]: reading /etc/resolv.conf
Jun 01 05:50:07 rg_arch dnsmasq[2098]: using nameserver 8.8.8.8#53
Jun 01 05:50:07 rg_arch dnsmasq[2098]: using nameserver 198.224.159.135#53
Jun 01 05:50:07 rg_arch dnsmasq[2098]: using nameserver 198.224.158.135#53

Last edited by rg_arc (2013-06-01 10:52:58)

Offline

#3 2013-06-01 20:09:05

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Internet share stops working randomly [SOLVED]

I had to re enable the dhcpcd service and now I get this output:

$ sudo systemctl status dhcpcd.service
dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled)
   Active: active (running) since Sat 2013-06-01 14:57:12 CDT; 9min ago
  Process: 2123 ExecStart=/sbin/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 2124 (dhcpcd)
   CGroup: name=systemd:/system/dhcpcd.service
           └─2124 /sbin/dhcpcd -q -b

Jun 01 14:57:12 rg_arch systemd[1]: Starting dhcpcd on all interfaces...
Jun 01 14:57:12 rg_arch dhcpcd[2123]: version 5.6.8 starting
Jun 01 14:57:12 rg_arch dhcpcd[2123]: wlan0: up_interface: Operation not possibl...ll
Jun 01 14:57:12 rg_arch dhcpcd[2123]: forked to background, child pid 2124
Jun 01 14:57:12 rg_arch systemd[1]: Started dhcpcd on all interfaces.
Jun 01 14:57:12 rg_arch dhcpcd[2124]: eth0: configured as a router, not a host
Jun 01 14:57:13 rg_arch dhcpcd[2124]: wlan0: configured as a router, not a host
Jun 01 14:57:13 rg_arch dhcpcd[2124]: ppp0: disabling Kernel IPv6 RA support
Jun 01 14:57:13 rg_arch dhcpcd[2124]: ppp0: configured as a router, not a host
Jun 01 14:57:13 rg_arch dhcpcd[2124]: eth0: waiting for carrier
Jun 01 14:57:13 rg_arch dhcpcd[2124]: wlan0: waiting for carrier
Jun 01 15:01:42 rg_arch dhcpcd[2124]: ppp0: carrier lost
Jun 01 15:01:42 rg_arch dhcpcd[2124]: manage_link: No such device or address
Jun 01 15:01:42 rg_arch dhcpcd[2124]: ppp0: removing interface
Jun 01 15:02:15 rg_arch dhcpcd[2124]: ppp0: disabling Kernel IPv6 RA support
Jun 01 15:02:15 rg_arch dhcpcd[2124]: ppp0: configured as a router, not a host
Jun 01 15:02:15 rg_arch dhcpcd[2124]: ppp0: removing IP address 0.0.0.0/0
Jun 01 15:02:15 rg_arch dhcpcd[2124]: ppp0: removing IP address 0.0.0.0/0

Here is the wlan0 setup:

$ ip addr show dev wlan0
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
    link/ether 00:25:56:60:91:4b brd ff:ff:ff:ff:ff:ff
    inet 10.42.0.1/24 brd 10.42.0.255 scope global wlan0
       valid_lft forever preferred_lft forever
    inet6 fe80::225:56ff:fe60:914b/64 scope link tentative 
       valid_lft forever preferred_lft forever

Last edited by rg_arc (2013-06-01 20:14:39)

Offline

#4 2013-06-01 21:22:22

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,355

Re: Internet share stops working randomly [SOLVED]

You have the cart in front of the horse.  Before you can do anything, you have to first associate your wlan0 with your router.

As a sanity check, what is the output of sudo iw wlan0 scan  ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2013-06-01 23:19:34

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Internet share stops working randomly [SOLVED]

I have to try the command twice to get the information

$ sudo iw wlan0 scan
command failed: Device or resource busy (-16)
$ sudo iw wlan0 scan
BSS c0:3f:0e:56:7d:de(on wlan0)
	TSF: 23969717003 usec (0d, 06:39:29)
	freq: 2437
	beacon interval: 100 TUs
	capability: ESS Privacy ShortSlotTime (0x0411)
	signal: -57.00 dBm
	last seen: 526 ms ago
	Information elements from Probe Response frame:
	SSID: ominous
	Supported rates: 1.0* 2.0* 5.5 11.0 18.0 24.0 36.0 54.0 
	DS Parameter set: channel 6
	ERP: <no flags>
	ERP D4.0: <no flags>
	RSN:	 * Version: 1
		 * Group cipher: CCMP
		 * Pairwise ciphers: CCMP
		 * Authentication suites: PSK
		 * Capabilities: 16-PTKSA-RC (0x000c)
	Extended supported rates: 6.0 9.0 12.0 48.0 
	HT capabilities:
		Capabilities: 0x186e
			HT20/HT40
			SM Power Save disabled
			RX HT20 SGI
			RX HT40 SGI
			No RX STBC
			Max AMSDU length: 7935 bytes
			DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 8 usec (0x06)
		HT RX MCS rate indexes supported: 0-7
		HT TX MCS rate indexes are undefined
	HT operation:
		 * primary channel: 6
		 * secondary channel offset: above
		 * STA channel width: any
		 * RIFS: 1
		 * HT protection: no
		 * non-GF present: 0
		 * OBSS non-GF present: 0
		 * dual beacon: 0
		 * dual CTS protection: 0
		 * STBC beacon: 0
		 * L-SIG TXOP Prot: 0
		 * PCO active: 0
		 * PCO phase: 0
	Overlapping BSS scan params:
		 * passive dwell: 20 TUs
		 * active dwell: 10 TUs
		 * channel width trigger scan interval: 300 s
		 * scan passive total per channel: 200 TUs
		 * scan active total per channel: 20 TUs
		 * BSS width channel transition delay factor: 5
		 * OBSS Scan Activity Threshold: 0.25 %
	Extended capabilities: HT Information Exchange Supported
	WPS:	 * Version: 1.0
		 * Wi-Fi Protected Setup State: 2 (Configured)
		 * Selected Registrar: 0x0
		 * Response Type: 3 (AP)
		 * UUID: 6da1743f-8af6-f88c-d99c-9acac6db66b0
		 * Manufacturer: NETGEAR, Inc.
		 * Model: WGR614v10
		 * Model Number: WGR614v10
		 * Serial Number: 83258
		 * Primary Device Type: 6-0050f204-1
		 * Device name: WGR614v10
		 * Config methods: Label, PBC
	WMM:	 * Parameter version 1
		 * u-APSD
		 * BE: CW 15-1023, AIFSN 3
		 * BK: CW 15-1023, AIFSN 7
		 * VI: CW 7-15, AIFSN 2, TXOP 3008 usec
		 * VO: CW 3-7, AIFSN 2, TXOP 1504 usec
$ sudo iw wlan0 scan
command failed: Device or resource busy (-16)
$

Offline

#6 2013-06-02 00:01:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,355

Re: Internet share stops working randomly [SOLVED]

Is it possible that you have more than one thing running that are trying to control your connection?  What is the output of systemctl   ??


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#7 2013-06-02 01:23:53

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Internet share stops working randomly [SOLVED]

pdnsd failed and iptables is "active(exited)" but nothing else out of the ordinary network wise:

console-kit-daemon.service     loaded active running   Console Manager
console-k...stem-start.service loaded active exited    Console System Startup Logging
cronie.service                 loaded active running   Periodic Command Scheduler
dbus.service                   loaded active running   D-Bus System Message Bus
dhcpcd.service                 loaded active running   dhcpcd on all interfaces
dnsmasq.service                loaded active running   A lightweight DHCP and caching DNS server
getty@tty1.service             loaded active running   Getty on tty1
iptables.service               loaded active exited    Packet Filtering Framework
lxdm.service                   loaded active running   LXDE Display Manager
ModemManager.service           loaded active running   Modem Manager
NetworkManager.service         loaded active running   Network Manager
nmbd.service                   loaded active running   Samba NetBIOS name server
ntpd.service                   loaded active running   Network Time Service
pdnsd.service                  loaded failed failed    proxy name server
polkit.service                 loaded active running   Authorization Manager
rtkit-daemon.service           loaded active running   RealtimeKit Scheduling Policy Service
smbd.service                   loaded active running   Samba SMB/CIFS server
syslog-ng.service              loaded active running   System Logger Daemon
systemd-binfmt.service         loaded active exited    Set Up Additional Binary Formats

Last edited by rg_arc (2013-06-02 01:24:44)

Offline

#8 2013-06-06 10:24:20

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Internet share stops working randomly [SOLVED]

I think I may have a problem with iptables and there is a configuration issue somewhere. I think this should still work once I iron out the kinks where ever they may be.

# systemctl status iptables.service
iptables.service - Packet Filtering Framework
   Loaded: loaded (/usr/lib/systemd/system/iptables.service; enabled)
   Active: active (exited) since Thu 2013-06-06 05:14:40 CDT; 7s ago
  Process: 852 ExecStop=/usr/lib/systemd/scripts/iptables-flush (code=exited, status=0/SUCCESS)
  Process: 855 ExecStart=/usr/bin/iptables-restore /etc/iptables/iptables.rules (code=exited, status=0/SUCCESS)

Jun 06 05:14:40 rg_arch systemd[1]: Starting Packet Filtering Framework...
Jun 06 05:14:40 rg_arch systemd[1]: Started Packet Filtering Framework.

I keep seeing "active (exited)" for iptables when I look at the status. Here is my iptables.rules file:

# Generated by iptables-save v1.4.19.1 on Thu Jun  6 05:12:27 2013
*filter
:INPUT ACCEPT [2:237]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [40:13024]
:TCP - [0:0]
:UDP - [0:0]
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Thu Jun  6 05:12:27 2013

Also when I look at the status for dhcpcd it says that my net interfaces are set up as routers and not hosts:

# systemctl status dhcpcd.service
dhcpcd.service - dhcpcd on all interfaces
   Loaded: loaded (/usr/lib/systemd/system/dhcpcd.service; enabled)
   Active: active (running) since Thu 2013-06-06 04:55:39 CDT; 24min ago
  Process: 213 ExecStart=/sbin/dhcpcd -q -b (code=exited, status=0/SUCCESS)
 Main PID: 223 (dhcpcd)
   CGroup: name=systemd:/system/dhcpcd.service
           └─223 /sbin/dhcpcd -q -b

Jun 06 04:55:39 rg_arch dhcpcd[223]: eth0: configured as a router, not a host
Jun 06 04:55:42 rg_arch dhcpcd[223]: wlan0: configured as a router, not a host
Jun 06 04:55:42 rg_arch dhcpcd[223]: eth0: waiting for carrier
Jun 06 04:55:43 rg_arch dhcpcd[223]: wlan0: waiting for carrier
Jun 06 04:56:28 rg_arch dhcpcd[223]: ppp0: configured as a router, not a host
Jun 06 04:56:28 rg_arch dhcpcd[223]: ppp0: waiting for 3rd party to configure IP address
Jun 06 04:56:28 rg_arch dhcpcd[223]: ppp0: removing IP address 0.0.0.0/0
Jun 06 04:56:28 rg_arch dhcpcd[223]: ppp0: removing IP address 0.0.0.0/0

Here is the output of ifconfig for all of the interfaces. I see the 10.42.0.1 gateway is still there for the wlan0 interface:

$ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 00:1f:16:a5:7c:3e  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 1326  bytes 83332 (81.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1326  bytes 83332 (81.3 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 75.248.251.91  netmask 255.255.255.255  destination 66.174.185.64
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 1045  bytes 710283 (693.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1066  bytes 277262 (270.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.42.0.1  netmask 255.255.255.0  broadcast 10.42.0.255
        inet6 fe80::225:56ff:fe60:914b  prefixlen 64  scopeid 0x20<link>
        ether 00:25:56:60:91:4b  txqueuelen 1000  (Ethernet)
        RX packets 35  bytes 7790 (7.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 74  bytes 13043 (12.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

So the ppp0 interface is the actual mobile broadband device and I want to use wlan0 to send the internet signal to the router. I was able to use 10.42.0.1 as the gateway address before and now my computer will not even connect to the router if its in the "shared with other computers" mode. Is there something I am missing or is there a configuration error anyone can see?

Last edited by rg_arc (2013-06-06 10:33:45)

Offline

#9 2013-06-08 10:35:01

rg_arc
Member
Registered: 2011-03-20
Posts: 508

Re: Internet share stops working randomly [SOLVED]

Ok after an exhaustive search I simply stopped the dnsmasq service from running and it solved everything.

Offline

Board footer

Powered by FluxBB