Debian As A Router [Not Assigning IPs]


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Debian As A Router [Not Assigning IPs]
# 1  
Old 01-31-2016
Debian As A Router [Not Assigning IPs]

I've been trying to set up an old desktop as a wifi router. I've looked at a lot of information online, but mostly this:

https://seravo.fi/2014/create-wirele...-point-hostapd

I've gotten where I can see the ssid from my phone and laptop. However, it starts to connect, but never receives an ip from the access point.

Here's what I have currently enabled in /etc/hostapd/hostapd.conf:
Code:
interface=wlan0
bridge=br0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=GhettoNet
country_code=US
hw_mode=g
channel=7
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
ignore_broadcast_ssid=0
wmm_enabled=1
wmm_ac_bk_cwmin=4
wmm_ac_bk_cwmax=10
wmm_ac_bk_aifs=7
wmm_ac_bk_txop_limit=0
wmm_ac_bk_acm=0
wmm_ac_be_aifs=3
wmm_ac_be_cwmin=4
wmm_ac_be_cwmax=10
wmm_ac_be_txop_limit=0
wmm_ac_be_acm=0
wmm_ac_vi_aifs=2
wmm_ac_vi_cwmin=3
wmm_ac_vi_cwmax=4
wmm_ac_vi_txop_limit=94
wmm_ac_vi_acm=0
wmm_ac_vo_aifs=2
wmm_ac_vo_cwmin=2
wmm_ac_vo_cwmax=3
wmm_ac_vo_txop_limit=47
wmm_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1

Here is what is currently in /etc/dnsmasq.conf:
Code:
interface=lo,wlan0
no-dhcp-interface=lo
dhcp-range=10.0.0.100,10.0.0.200,255.255.255.0,4h

I also have the following start up script for boot time as well:

Code:
#!/bin/bash

rfkill unblock 0

iptables -F
iptables -t nat -F

iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT

iptables -A FORWARD -i wlan0 -s 10.0.0.0/255.255.255.0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

/etc/init.d/dnsmasq restart
/etc/init.d/hostapd restart

ifconfig br0 up

It appears this is a problem with dnsmasq or the br0 interface:

Code:
# /etc/init.d/dnsmasq status
● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
   Loaded: loaded (/lib/systemd/system/dnsmasq.service; disabled)
  Drop-In: /run/systemd/generator/dnsmasq.service.d
           └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
   Active: active (running) since Sat 2016-01-30 23:14:46 CST; 5min ago
  Process: 1020 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
  Process: 1011 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
  Process: 1008 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)
 Main PID: 1019 (dnsmasq)
   CGroup: /system.slice/dnsmasq.service
           └─1019 /usr/sbin/dnsmasq -x /var/run/dnsmasq/dnsmasq.pid -u dnsmasq -7 /etc/dnsmasq.d,.dpkg-dist,
dpkg-old,.dpkg-new --local-service --trust-anchor=.,19036,8,2,49AAC11D...

Jan 30 23:17:30 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:17:47 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:17:49 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:17:54 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:18:02 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:18:19 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:18:20 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:18:25 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:18:32 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address
Jan 30 23:18:48 leviathan dnsmasq-dhcp[1019]: DHCP packet received on br0 which has no address

I should also note that I have already installed bridge-utils and rebooted. Any suggestions greatly appreciated.

EDIT: I found enabling "bind-interfaces" in /etc/dnsmasq.conf silenced the "DHCP packet received on br0 which has no address" message with /etc/init.d/dnsmasq status. However, still not getting any ip addresses...

Last edited by Azrael; 01-31-2016 at 03:40 AM..
# 2  
Old 03-09-2016
You might consider FREESCO Project
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote Unix printing to my WinXP works with no router. How can I make it work through my router?

I set up remote printing on a clients Unix server to my Windows XP USB printer. My USB printer is connected directly to my PC (no print server and no network input on printer). With my Win XP PC connected to my cable modem (without the router), i can do lp -dhp842c /etc/hosts and it prints. I... (7 Replies)
Discussion started by: jmhohne
7 Replies

2. Linux

routing rules for dmz in debian router.

Hi to all. There are eth0(wan) eth1(lan) and eth3(dmz) in my debian router. In dmz is planing dns, ad, dhcp, smtp/pop/imap, https(web-based imap client). I don't configured rules on "iptables" and "route" loads for right relation lan clients with dmz services. Please explain me example... (0 Replies)
Discussion started by: sotich82
0 Replies
Login or Register to Ask a Question