I'm running Debian v8 (systemd purged and systemV installed ... works fine). It is a clean installation (Debian v7 used to be on this machine) The harddrives failed after numerous power failures on 1 day. I restored all configuration files from my backups i.e: network, squid, proftp, mysql, apache, iptables etc.
This Debian 8 machine interacts (or is supposed to rather) with other servers (samba, serviio, ftp, mysql) on the internal network. The problem I am experiencing is that the internet (and connections to the other machines on the local network) disappears after a few seconds and I am unable to ping the router although I can ping the wireless card (wlan0) and ethetnet card (eth0) on this Debian 8 machine.
I have hostapd setup between wlan0 and eth0 via br0 to give people wireless access to the internet. I am stumped as to what the problem might be as I have checked and re-checked everything from my backups.
This Debian v8 machine network config is this:
wlan0 -----> br0 -------> eth0 -----> router ----> internet
(10.0.0.5)-> (10.0.0.4)-> (10.0.0.3)->(10.0.0.2)-> internet
____^___ (All local machines connect through wlan0)
Bind9 works fine. Interfaces comes up fine.
Like I said, I can ping 10.0.0.5/4/3 with no problem but cannot ping the router or any other machine on the network. The network is 10.0.0.0/24 with netmask 255.255.255.0.
Here is my routing table:
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.2 0.0.0.0 UG 0 0 0 eth0
link-local * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.255.0 U 0 0 0 br0
link-local * 255.255.255.0 U 0 0 0 wlan0
Here is iptables:
# Generated by iptables-save v1.4.21 on Thu Jun 11 10:35:35 2015
*mangle
:PREROUTING ACCEPT [403:63515]
:INPUT ACCEPT [385:56330]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [432:59142]
:POSTROUTING ACCEPT [432:59142]
COMMIT
# Completed on Thu Jun 11 10:35:35 2015
# Generated by iptables-save v1.4.21 on Thu Jun 11 10:35:35 2015
*filter
:INPUT ACCEPT [385:56330]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [432:59142]
#-A INPUT -i eth0 -p tcp -m tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
-A FORWARD -s 10.0.0.0/24 -i eth0 -o wlan0 -m conntrack --ctstate NEW -j ACCEPT
-A FORWARD -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
COMMIT
# Completed on Thu Jun 11 10:35:35 2015
# Generated by iptables-save v1.4.21 on Thu Jun 11 10:35:35 2015
*nat
:PREROUTING ACCEPT [19:7421]
:INPUT ACCEPT [1:236]
:OUTPUT ACCEPT [55:3490]
:POSTROUTING ACCEPT [0:0]
# Below is for routing local network http requests (port 80) to squid 3128
#-A PREROUTING -s 10.0.0.0/24 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
#-A PREROUTING -i wlan0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.0.0.5:3128
-A POSTROUTING -j MASQUERADE
COMMIT
# Completed on Thu Jun 11 10:35:35 2015
Here is my interfaces file:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
iface eth0 inet static
address 10.0.0.3
netmask 255.255.255.0
network 10.0.0.0
hwaddress e7:df:12:00:1g:63
broadcast 10.0.0.255
dns-nameservers 10.0.0.5 10.0.0.2
dns-search 10.0.0.5 10.0.0.2
gateway 10.0.0.2
auto eth0
iface wlan0 inet static
mode infrastructure
wireless-mode master
wireless-essid "fever"
wireless-channel 1
address 10.0.0.5
netmask 255.255.255.0
network 10.0.0.0
gateway 10.0.0.2
hwaddress 1d:dd:b2:2a:ae:1d
broadcast 10.0.0.255
dns-nameservers 10.0.0.5 10.0.0.2
dns-search 10.0.0.5 10.0.0.2
auto wlan0
## Setup the bridge
iface br0 inet static
bridge-ports wlan0 eth0
address 10.0.0.4
netmask 255.255.255.0
network 10.0.0.0
gateway 10.0.0.2
dns-nameservers 10.0.0.5 10.0.0.2
dns-search 10.0.0.5 10.0.0.2
auto br0
Here is my hostapd.conf:
interface=wlan0
bridge=br0
driver=nl80211
country_code=ZA
ssid=fever
hw_mode=g
channel=6
wpa=2
wpa_passphrase=123abc123
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
auth_algs=1
macaddr_acl=0
ignore_broadcast_ssid=0
All traces of Network-Manager (therefore Gnome) has been purged together with wicd. I have isc-dhcp-server which serves IP addresses on wlan0.
I have noticed that /etc/resolv.conf (which points to /etc/resolvconf/run/resolv.conf) sometimes disappears and when it is there it is empty.
If I disable hostapd and remove br0 I can access the internet. So there is some interference from somewhere if I enable hostapd and br0 which only works for a few seconds if they are enabled.
I have no dhcp-client ... I have wpa_supplicant and the normal wireless-tools installed.