I need to configure wifi-eathernet bridge for my IP cameras net. I've tried to use this tutorial: Sharing the Pi's WiFi connection through the Ethernet port, to resolve my issue and experienced another one. When I try to start dnsmasq as sudo systemctl start dnsmsq the error occured. Here is the code:

● dnsmasq.service - dnsmasq - A lightweight DHCP and caching DNS server
Loaded: loaded (/lib/systemd/system/dnsmasq.service; enabled)
Drop-In: /run/systemd/generator/dnsmasq.service.d
         └─50-dnsmasq-$named.conf, 50-insserv.conf-$named.conf
Active: failed (Result: resources) since Tue 2018-06-12 14:01:24 UTC; 44s ago
Process: 1072 ExecStop=/etc/init.d/dnsmasq systemd-stop-resolvconf (code=exited, status=0/SUCCESS)
Process: 1069 ExecStartPost=/etc/init.d/dnsmasq systemd-start-resolvconf (code=exited, status=0/SUCCESS)
Process: 1067 ExecStart=/etc/init.d/dnsmasq systemd-exec (code=exited, status=0/SUCCESS)
Process: 1064 ExecStartPre=/usr/sbin/dnsmasq --test (code=exited, status=0/SUCCESS)

Also, here is sudo journalctl -u dnsmasq.service result:

-- Logs begin at Tue 2018-06-12 14:01:03 UTC, end at Tue 2018-06-12 14:41:02 UTC. --
Jun 12 14:01:07 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Jun 12 14:01:07 raspberrypi dnsmasq[445]: dnsmasq: syntax check OK.
Jun 12 14:01:07 raspberrypi systemd[1]: PID file /var/run/dnsmasq/dnsmasq.pid not readable (yet?) after start-post.
Jun 12 14:01:08 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jun 12 14:01:08 raspberrypi systemd[1]: Unit dnsmasq.service entered failed state.
Jun 12 14:01:24 raspberrypi systemd[1]: Stopped dnsmasq - A lightweight DHCP and caching DNS server.
Jun 12 14:01:24 raspberrypi systemd[1]: Starting dnsmasq - A lightweight DHCP and caching DNS server...
Jun 12 14:01:24 raspberrypi dnsmasq[1064]: dnsmasq: syntax check OK.
Jun 12 14:01:24 raspberrypi systemd[1]: PID file /var/run/dnsmasq/dnsmasq.pid not readable (yet?) after start-post.
Jun 12 14:01:24 raspberrypi systemd[1]: Failed to start dnsmasq - A lightweight DHCP and caching DNS server.
Jun 12 14:01:24 raspberrypi systemd[1]: Unit dnsmasq.service entered failed state.

Result: resources - not a very informative message. Could you please help me with this.

Here are all configuration:

/etc/dnsmasq.conf

interface=eth0
listen-address=172.24.2.1
bind-interfaces                         
server=8.8.8.8                          
domain-needed                           
bogus-priv                              
dhcp-range=172.24.2.50,172.24.2.60,12h

/etc/iptables.ipv4.nat

# Generated by iptables-save v1.4.21 on Tue Jun 12 11:45:00 2018
*filter
:INPUT ACCEPT [1:76]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1:76]
-A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -o wlan0 -j ACCEPT
COMMIT
# Completed on Tue Jun 12 11:45:00 2018
# Generated by iptables-save v1.4.21 on Tue Jun 12 11:45:00 2018
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o wlan0 -j MASQUERADE
COMMIT
# Completed on Tue Jun 12 11:45:00 2018

/etc/network/interfaces

auto lo
iface lo inet loopback

# iface eth0 inet manual
allow-hotlug eth0
iface eth0 inet static
    address 172.24.2.1
    netmask 255.255.255.0
    network 172.24.2.0
    broadcast 172.24.2.255


allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

/proc/sys/net/ipv4/ip_forward

1

Thanks in advance!

  • Anything useful from journalctl -u dnsmasq.service? If so, it might be helpful to edit the output into your post. – Aurora0001 Jun 12 at 14:35
  • @Aurora0001 Unfortunately: pi@raspberrypi:~ $ journalctl -u dnsmasq.service No journal files were found. – Taras Mykhalevych Jun 12 at 14:38
  • Oh, you might need to run it with root (sudo journalctl -u dnsmasq.service); apparently that's systemd's way of telling you that you haven't got privileges! – Aurora0001 Jun 12 at 14:40
  • Yeeeah, you are right. My bad. – Taras Mykhalevych Jun 12 at 14:45

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.