I put this post on the Bug Category.
Bug setting Static IP under Jessie DietPi!!!
I try to create a static IP address as it's supposed to be done under Jessie, but DietPi doesn't have dhcpcd. I see DietPi creates it as Jessie was Wheezy, and this can create troubles to some apps, as dnsmasq, used too by PiHole.
As a secondary effect of this, when I try to use dnsmasq as a DHCP server, dnsmasq gets a SIGTERM signal from some DietPi process and I have to be all the time restarting dnsmasq. When I realize dnsmasq is dead, and PiHole is not working
This doesn't happen in Raspbian Jessie Lite Official Imagehttps://downloads.raspberrypi.org/raspbian_lite_latest. There's dhcpcd and nothing kills dnsmasq.
Can this be solved for the next Dietpi release? This is not good for PiHole neither!
Sorry, this will be a long post. Just desiring to help (and to be helped).
I’m trying to have a RPi 2 as a parental control/router/gateway/proxy/firewall/content filter using 2 ethernet interfaces. Eth0, internal Ethernet, goes to the DSL modem and to the Internet. Eth1, USB 1 Gbit Ethernet TPLINK UE300 to the internal network.
I was using a non-compatible USB Ethernet dongle, believing it was a compatible ASIX, but it wasn’t. Thanks to Fourdee, I could solve this buying the UE300, which is compatible, out-of-the-box.
DIETPI WHEEZIE ISSUES
I installed everything, dnsmasq, squid, dansguardian… and it seemed to work. I just had some troubles with the USB dongle, as I said before, that I got solved on another post you can find in “troubleshooting” section in this forum.
If you want to check how to configurate this, this is the post: http://dietpi.com/phpbb/viewtopic.php?f=11&t=267
So, encouraged for these good results, I tried to go Jessie.
DIETPI JESSIE ISSUES
I did all the same and dnsmasq is now working a few minutes and then it stops. It’s not the same issue as when I was using the old USB Ethernet dongle (then it was creating a kernel panic). Now, when I use “log-queries” on dnsmasq, it says that it has received a “SIGTERM”, so something is killing dnsmasq. If I restart the dnsmasq service, it works again for some minutes and it receives the SIGTERM message again.
OFFICIAL MINIMAL JESSIE ISSUES
So, I’ve tried it on the official Jessie Raspbian, and it works and doesn’t have this issue. But I’m doing something different.
STATIC IPS ISSUES
If you want to have a static IP under Jessie, you are supposed to do it in a different way. You say to /etc/network/interfaces it’s manual (see code) and go to the dhcpcd.conf and you config there the static IP.
Under Jessie Dietpi I was configuring static IPs as I were using Wheezie (and I realised dietpi-config does it the same way, just modifying /etc/network/interfaces/ the same way I've shown in the other post). When I tried to do it “the Jessie Way” I realized there wasn’t any dhcpcd.conf, but a dhclient.conf. So I tried to use it as it was dhcpcd.conf but it destroyed all the network config: I couldn’t go into RPi under SSH and it didn’t respond to pings and didn’t got any IP.
How I have set this config under Official Minimal Jessie:
Code: Select all
source-directory /etc/network/interfaces.d auto lo iface lo inet loopback iface eth0 inet manual allow-hotplug eth1 iface eth1 inet manual
Code: Select all
interface eth1 static ip_address=192.168.50.1/24 static routers=192.168.50.1 static domain_name_servers=192.168.50.1
I have 2 SDs, one with Official Jessie Raspbian, and other one with Dietpi Jessie Raspbian. If there is something I can check or change to DietPi SD, I’ll do it, to get dnsmasq working as a DHCP server under DietPi. The reality is that I would love to have my RPi “parental control router” using Jessie DietPi.
But I think there’s something strange in DietPi Jessie. For example, I tried using dnsmasq as a DHCP+DNS server using PiHole, so I installed Pihole (it’s dnsmasq configured as a DNS server) and then I modified dnsmasq.conf to use eth1 and configured the DHCP server on it, but dnsmasq didn’t give any IP to my Macbook connected to eth1, so I didn’t get DHCP dnsmasq server working.
Thank you very much for your attention and patience reading this long post,
I hope if there's a bug, this post will help DietPi to be improved; and if it's consequence of my ignorance (because as I've said before I'm newbie setting up Linux servers), this will help me to improve and know Linux much better.
Here you can see DietPi is lighter than official "minimal" Jessie: less memory usage, less cpu load, more disk space, 83 (versus 96) processes running, having installed lots of software and dependencies (dnsmasq, squid3, dansguardian, webmin...). DietPi is better!