0

Its currently set up as follows:

# /etc/dnsmasq.conf

domain-needed
bogus-priv
address=/doubleclick.net/127.0.0.1
except-interface=eth0
dhcp-range=interface:eth1,192.168.1.10,192.168.1.127,12h
dhcp-range=interface:eth2,192.168.2.10,192.168.2.127,12h
log-queries

I have 3 network cards, eth0 is connected to ADSL router, eth1 is connected to wireless AP and eth2 to switch and other computers are connected to that switch.

When I try to start dnsmasq I get "dnsmasq: failed to create listening socket: Address already in use"

lsof -i

shows only following commands: portmap, rpc.statd, smbd, sshd, mysqld, named, samba and apache2.

netstat -antuevp

shows only programs: mysqld, smbd, rpc.statd, portmap, apache2, named, sshd and smbd.

I did have dhcp client and server installed before installing dnsmasq, but have removed it since.

Here's /etc/network/interfaces if that can help:

# /etc/network/interfaces
auto lo
iface lo inet loopback

mapping hotplug
        script grep
        map eth1

auto eth0
iface eth0 inet static
    address 192.168.0.128
    netmask 255.255.255.0

auto eth1
iface eth1 inet static
    address 192.168.1.128
    netmask 255.255.255.0

auto eth2
iface eth2 inet static
    address 192.168.2.128
    netmask 255.255.255.0

Edit: gave static IPs to all.

Also, someone on dnsmasq suggested to remove named so I'll try that as well.

1 Answer 1

2

If you're trying to run DHCP on them, which don't eth1 and eth2 have static addresses? I assume you're trying to isolate the wireless network from the wired LAN (otherwise you'll need bridging)?

5
  • Its not so much that I want to isolate them, I just want them in separate subnets...
    – Shinhan
    Jun 25, 2010 at 4:45
  • I dont want to isolate them, I just thought they should be in separate subnets. I still want them in the same windows workgroup and able to communicate with each other. WAP is different interface only for later when I want to throttle it more than wired connections, and apply stricter firewall rules.
    – Shinhan
    Jun 25, 2010 at 4:55
  • Have you tried giving eth1 and eth2 static IP addresses in /etc/network/interfaces? If this machine is supposed to act as the DHCP server for those subnets, it doesn't really make sense to expect it to get its own IP address from some other DHCP server - and it doesn't make sense to expect it to participate in the DHCP protocol without having an IP address. From a quick look at the source code, it looks to me like the error message you're seeeing reflects a general failure to create a socket, but not necessarily because the IP:PORT pair is already in use.
    – gbroiles
    Jun 25, 2010 at 7:26
  • ok, I changed so it uses static IPs. Also, someone on dnsmasq mlist suggested to remove named so I'll try that as well.
    – Shinhan
    Jun 25, 2010 at 10:38
  • Yea, turns out named is part of bind9 which is DNS server, so I removed it, and now DNS works. Still no internet on the rest of the network, but thats no longer the same question.
    – Shinhan
    Jun 25, 2010 at 12:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .