We have used dnsmasq to set up a wifi to ethernet router on raspbian jessie. I have configured eth0 for static IP address using dhcpcd.conf file and it is given as follows.

interface eth0
static ip_address
static routers=
static domain_name_servers=

But this assigns IP address only when a device is attached to it. At the time of development, I didn't connect a device.

dnsmasq.conf file for the router look like as follows.


# Bind to the interface to make sure we aren't sending things
# elsewhere

server= # Forward DNS requests to Google DNS
domain-needed # Don't forward short names

# Never forward addresses in the non-routed address spaces.
# Assign IP addresses between and with a
# 12 hours lease time


Then I tried to start dnsmasq and it was a failure. dnsmasq failed to start because the eth0 has no IP.

I have connected a device to eth0 port and again tried to start dnsmasq and it worked now.

But on each reboot, I need to start the dnsmasq manually. After the research on google, I found that commenting the line bind-interfaces will help. So I commented the line and dnsmasq start to work at boot.

According to the man page, I understand that it is used for multiple interfaces, isn't it?

Actually, I didn't know what bind-interface do? How they affect my router? Can you anyone help me with examples to understand the usage of bind-interface?

  • Remove the static routers= static domain_name_servers= state you are setting up "a wifi to ethernet router" have you configured routing and masquerade
    – Milliways
    Commented Mar 8, 2019 at 6:27
  • 1
    You do not need to specify bind-interfaces You should not need listen-address either
    – Milliways
    Commented Mar 8, 2019 at 6:32
  • @Milliways yes i defined nat rules. Can you explain with reason? Why don't need static_router and domain_name_server? If I didn't provided bind-interface , it will listen on all ip addresses, is that any problem?
    – vishnu m c
    Commented Mar 8, 2019 at 7:24
  • I do not claim to be an expert on routers, but have never needed to set this on an Access Point. It was a suggestion to try. It is the job of the DHCP server to specify these parameters. I suggest you read man dnsmasq
    – Milliways
    Commented Mar 8, 2019 at 7:45
  • Ok i will try that, But when i use /etc/network/interfaces file, there was no problem with dnsmasq.
    – vishnu m c
    Commented Mar 8, 2019 at 8:24


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.