From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matthias Fischer To: development@lists.ipfire.org Subject: [PATCH] (V4) Forcing DNS/NTP Date: Fri, 04 Jun 2021 14:17:21 +0200 Message-ID: <20210604121721.3840-1-matthias.fischer@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============4109497889949924057==" List-Id: --===============4109497889949924057== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable There was not much feedback on the list, so I send this now. This is V4 - ope= n for discussion, opinions or (perhaps ;-) ) changes: Originally triggered by: https://community.ipfire.org/t/forcing-all-dns-traffic-from-the-lan-to-the-fi= rewall/3512 Discussion: https://community.ipfire.org/t/testing-dns-redirect-code-snippet/3888 Could fix(?): https://bugzilla.ipfire.org/show_bug.cgi?id=3D11168 Changelog since V3: - Replaced 'green0'/'blue0' with '${GREEN_DEV}' / '${BLUE_DEV}' - these values are read from '/var/ipfire/ethernet/settings', thanks to "someone" for the hint (sorry, I didn't find the author)! ;-) - Replaced port numbers '123' / '53' with service names 'domain' / 'ntp' (dto= .). - As mentioned on the list (05.03.2021, BB), 'well-behaving' requests are now handled through RETURN rules, others through REDIRECT. Background (cited from BB, 06.03.2021): "Concerning performance, we want to minimize the rule set to the amount really necessary. On the other hand, it may be quicker to do just a RETURN than a REDIRECT. The cases for the RETURN (DNS requests direct to IPFire) should be nearly 100%. DNS and NTP servers are published by DHCP or should be configured in the static case." I made it that way. Statistics during the last 62 days show that this worked as intended. IMHO. I've sent a screenshot to the list (the other day) = so everyone could take a look. - Removed GUI links to DNS and NTP options in 'optionsfw.cgi'. - Moved creation of the iptable rules in '/etc/init.d/firewall' behind '# WIRELESS chains' Summary and functionality: These patches are controlled through "Firewall Options". They add new firewall-[DNS/NTP]_FORCED_ON_[INTERFACE]-options to '/var/ipfire/optionsfw/= settings'. They activate/deactivate appropriate RETURN and REDIRECT rules through a new ctrl file ('/usr/local/bin/dnsntpctrl') and a new init file ('/etc/rc.d/init.d/dnsntp'). Default of all new rules is OFF (set in 'lfs/configroot'). If set to ON, they REDIRECT all DNS and NTP requests (TCP/UDP) to the DNS a= nd NTP servers specified in IPFire. Flaw/ToDo: To make things work as I wanted I had to add a 'dnsntpctrl' file which call= s the actual init file, 'dnsntp'. As I see it, this is actually an unnecessary detour. In fact I wanted to merge these two files in *one* C file, but this was bey= ond my capabilities, perhaps "someone" else knows how to program this. Changed visibility (GUI, 'optionsfw.cgi') and some cosmetics: The corresponding interface options - including 'Masquerade ...' - are only= visible if the respective interface actually exists. E.g.: if BLUE interface doesn't exist, there are no ON/OFF switches for 'DNS/NTP on BLUE' or logging options for BLUE available. Added text colors for better readability. Separated logging options per interface. No reboot required: Rules can be switched ON/OFF without rebooting IPFire. Changes immedediately take effect after clicking 'Save'. Changes to '/etc/rc.d/init.d/firewall' and '/etc/rc.d/init.d/dnsntpctrl': Fixed a 'trafic' typo. To avoid collisions with existing CUSTOM rules, I added a new PREROUTING chain: 'DNS_NTP_REDIRECT'. This chain is flushed by 'dnsntpctrl' prior applying the choosen settings. Signed-off-by: Matthias Fischer --- config/rootfiles/common/misc-progs | 1 + html/cgi-bin/optionsfw.cgi | 90 ++++++++++++++++++++++++------ langs/de/cgi-bin/de.pl | 15 +++-- langs/en/cgi-bin/en.pl | 15 +++-- lfs/configroot | 6 +- src/initscripts/system/dnsntp | 43 ++++++++++++++ src/initscripts/system/firewall | 9 ++- src/misc-progs/Makefile | 2 +- src/misc-progs/dnsntpctrl.c | 19 +++++++ 9 files changed, 171 insertions(+), 29 deletions(-) create mode 100644 src/initscripts/system/dnsntp create mode 100644 src/misc-progs/dnsntpctrl.c diff --git a/config/rootfiles/common/misc-progs b/config/rootfiles/common/mis= c-progs index d6594b3f8..4bcb94812 100644 --- a/config/rootfiles/common/misc-progs +++ b/config/rootfiles/common/misc-progs @@ -5,6 +5,7 @@ usr/local/bin/captivectrl usr/local/bin/collectdctrl usr/local/bin/ddnsctrl usr/local/bin/dhcpctrl +usr/local/bin/dnsntpctrl usr/local/bin/extrahdctrl usr/local/bin/fireinfoctrl usr/local/bin/firewallctrl diff --git a/html/cgi-bin/optionsfw.cgi b/html/cgi-bin/optionsfw.cgi index 321642e82..2059a03b3 100644 --- a/html/cgi-bin/optionsfw.cgi +++ b/html/cgi-bin/optionsfw.cgi @@ -50,6 +50,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) { $errormessage .=3D $Lang::tr{'new optionsfw later'}; &General::writehash($filename, \%settings); # Save good settin= gs system("/usr/local/bin/firewallctrl"); + system("/usr/local/bin/dnsntpctrl >/dev/null 2>&1"); }else{ if ($settings{'POLICY'} ne ''){ $fwdfwsettings{'POLICY'} =3D $settings{'POLICY'}; @@ -65,6 +66,7 @@ if ($settings{'ACTION'} eq $Lang::tr{'save'}) { &General::writehash("${General::swroot}/firewall/settings", \%fwdfwsetting= s); &General::readhash("${General::swroot}/firewall/settings", \%fwdfwsettings= ); system("/usr/local/bin/firewallctrl"); + system("/usr/local/bin/dnsntpctrl >/dev/null 2>&1"); } &General::readhash($filename, \%settings); # Load good settings } @@ -140,6 +142,18 @@ $selected{'MASQUERADE_ORANGE'}{$settings{'MASQUERADE_ORA= NGE'}} =3D 'selected=3D"sele $selected{'MASQUERADE_BLUE'}{'off'} =3D ''; $selected{'MASQUERADE_BLUE'}{'on'} =3D ''; $selected{'MASQUERADE_BLUE'}{$settings{'MASQUERADE_BLUE'}} =3D 'selected=3D"= selected"'; +$checked{'DNS_FORCE_ON_GREEN'}{'off'} =3D ''; +$checked{'DNS_FORCE_ON_GREEN'}{'on'} =3D ''; +$checked{'DNS_FORCE_ON_GREEN'}{$settings{'DNS_FORCE_ON_GREEN'}} =3D "checked= =3D'checked'"; +$checked{'DNS_FORCE_ON_BLUE'}{'off'} =3D ''; +$checked{'DNS_FORCE_ON_BLUE'}{'on'} =3D ''; +$checked{'DNS_FORCE_ON_BLUE'}{$settings{'DNS_FORCE_ON_BLUE'}} =3D "checked= =3D'checked'"; +$checked{'NTP_FORCE_ON_GREEN'}{'off'} =3D ''; +$checked{'NTP_FORCE_ON_GREEN'}{'on'} =3D ''; +$checked{'NTP_FORCE_ON_GREEN'}{$settings{'NTP_FORCE_ON_GREEN'}} =3D "checked= =3D'checked'"; +$checked{'NTP_FORCE_ON_BLUE'}{'off'} =3D ''; +$checked{'NTP_FORCE_ON_BLUE'}{'on'} =3D ''; +$checked{'NTP_FORCE_ON_BLUE'}{$settings{'NTP_FORCE_ON_BLUE'}} =3D "checked= =3D'checked'"; =20 &Header::openbox('100%', 'center',); print "
"; @@ -189,13 +203,44 @@ END END } =20 - print < + +   + $Lang::tr{'fw green'} + + $Lang::tr{'dns force on green'}<= td align=3D'left'>$Lang::tr{'on'} / + $Lang::tr{'off'} + $Lang::tr{'ntp force on green'}<= td align=3D'left'>$Lang::tr{'on'} / + $Lang::tr{'off'} +END + + if (&Header::blue_used()) { + print < + $Lan= g::tr{'fw blue'} +   + + $Lang::tr{'dns force on blue'}<= td align=3D'left'>$Lang::tr{'on'} / + $Lang::tr{'off'} + $Lang::tr{'ntp force on blue'}<= td align=3D'left'>$Lang::tr{'on'} / + $Lang::tr{'off'} + $Lang::tr{'drop proxy'}$Lang::tr{'on'} / + $Lang::tr{'off'} + $Lang::tr{'drop samba'}$Lang::tr{'on'} / + $Lang::tr{'off'} + + +END + } + + print < =20 -
+
=20 - - +
$Lang:= :tr{'fw logging'}
+ -$Lang::tr{'on'} / +END + + if (&Header::blue_used()) { + print < + +
+ +
$Lang:= :tr{'fw logging red'}
$Lang::tr{'drop newnotsyn'}$Lang::tr{'on'} / $Lang::tr{'off'}
$Lang::tr{'drop input'}$Lang::tr{'on'} / @@ -206,21 +251,30 @@ END $Lang::tr{'off'}
$Lang::tr{'drop portscan'}$Lang::tr{'on'} / $Lang::tr{'off'}
$Lang::tr{'drop wirelessinput'}
+ + + = -<= td align=3D'left'>$Lang::tr{'on'} / + -
$Lang:= :tr{'fw logging blue'}
$Lang::tr{'drop wirelessinput'}$Lang::tr{'on'} / $Lang::tr{'off'}
$Lang::tr{'drop wirelessforward'}
$Lang::tr{'drop wirelessforward'}$Lang::tr{'on'} / $Lang::tr{'off'}
-
+ +END + } + + print < + +
=20 - - - - -
$Lang:= :tr{'fw blue'}
$Lang::tr{'drop proxy'}$Lang::tr{'on'} / - $Lang::tr{'off'}
$Lang::tr{'drop samba'}$Lang::tr{'on'} / - $Lang::tr{'off'}
-
END print "
$Lang:= :tr{'fw settings'}
$Lang::tr{'fw settings color'}$Lang::tr{'on'} / @@ -252,7 +306,7 @@ END =20
-
+
@@ -278,7 +332,7 @@ print <
"; - print"

"; + print"

"; print < diff --git a/langs/de/cgi-bin/de.pl b/langs/de/cgi-bin/de.pl index 0bc579cd2..51e65b903 100644 --- a/langs/de/cgi-bin/de.pl +++ b/langs/de/cgi-bin/de.pl @@ -835,6 +835,8 @@ 'dns error 0' =3D> 'Die IP Adresse vom prim=C3=A4ren DNS Se= rver ist nicht g=C3=BCltig, bitte =C3=BCberpr=C3=BCfen Sie Ihre Eingabe!
Die eingegebene sekund=C3=A4ren DNS Server Adresse ist jedo= ch g=C3=BCltig.
', 'dns error 01' =3D> 'Die eingegebene IP Adresse des prim=C3=A4ren wie auch des sekund=C3=A4ren DNS-Servers sind nicht g= =C3=BCltig, bitte =C3=BCberpr=C3=BCfen Sie Ihre Eingaben!', 'dns error 1' =3D> 'Die IP Adresse vom sekund=C3=A4ren DNS = Server ist nicht g=C3=BCltig, bitte =C3=BCberpr=C3=BCfen Sie Ihre Eingabe!Die eingegebene prim=C3=A4re DNS Server Adresse ist jedoc= h g=C3=BCltig.', +'dns force on blue' =3D> 'Erzwinge lokale DNS-Server', +'dns force on green' =3D> 'Erzwinge lokale DNS-Server', 'dns forward disable dnssec' =3D> 'DNSSEC deaktivieren (nicht empfohlen)', 'dns forwarding dnssec disabled notice' =3D> '(DNSSEC deaktiviert)', 'dns header' =3D> 'DNS Server Adressen zuweisen nur mit DHCP an red0', @@ -1101,9 +1103,12 @@ 'from email server' =3D> 'Von E-Mail-Server', 'from email user' =3D> 'Von E-Mail-Benutzer', 'from warn email bad' =3D> 'Von E-Mail-Adresse ist nicht g=C3=BCltig', -'fw blue' =3D> 'Firewalloptionen f=C3=BCr das Blaue Interface', +'fw blue' =3D> 'Firewalloptionen f=C3=BCr das BLAU= E Interface', 'fw default drop' =3D> 'Firewallrichtlinie', +'fw green' =3D> 'Firewalloptionen f=C3=BCr das GR= =C3=9CNE Interface', 'fw logging' =3D> 'Firewallprotokollierung', +'fw logging blue' =3D> 'Firewallprotokollierung (B= LAU)', +'fw logging red' =3D> 'Firewallprotokollierung (RO= T)', 'fw settings' =3D> 'Firewalleinstellungen', 'fw settings color' =3D> 'Farben in Regeltabelle anzeigen', 'fw settings dropdown' =3D> 'Alle Netzwerke auf Regelerstellungsseite anzeig= en', @@ -1643,9 +1648,9 @@ 'map to guest' =3D> 'Map to Guest', 'march' =3D> 'M=C3=A4rz', 'marked' =3D> 'Markiert', -'masquerade blue' =3D> 'NAT auf BLAU', -'masquerade green' =3D> 'NAT auf GR=C3=9CN', -'masquerade orange' =3D> 'NAT auf ORANGE', +'masquerade blue' =3D> 'NAT auf BLAU= ', +'masquerade green' =3D> 'NAT auf GR=C3=9CN', +'masquerade orange' =3D> 'NAT auf ORANGE', 'masquerading' =3D> 'Masquerading/NAT', 'masquerading disabled' =3D> 'NAT ausgeschaltet', 'masquerading enabled' =3D> 'NAT eingeschaltet', @@ -1813,6 +1818,8 @@ 'november' =3D> 'November', 'ntp common settings' =3D> 'Allgemeine Einstellungen', 'ntp configuration' =3D> 'Zeitserverkonfiguration', +'ntp force on blue' =3D> 'Erzwinge lokale NTP-Server', +'ntp force on green' =3D> 'Erzwinge lokale NTP-Server', 'ntp must be enabled to have clients' =3D> 'Um Clients annehmen zu k=C3=B6nn= en, muss NTP vorher aktiviert sein.', 'ntp server' =3D> 'NTP-Server', 'ntp sync' =3D> 'Synchronisation', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index 1c69b3798..390b2d026 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -858,6 +858,8 @@ 'dns error 0' =3D> 'The IP address of the primary DNS serve= r is not valid, please check your entries!
The entered secondary= DNS server address is valid.', 'dns error 01' =3D> 'The entered IP address of the primary = and secondary DNS server are not valid, please check your en= tries!', 'dns error 1' =3D> 'The IP address of the secondary DNS ser= ver is not valid, please check your entries!
The entered primary= DNS server address is valid.', +'dns force on blue' =3D> 'Force DNS to use local DNS servers', +'dns force on green' =3D> 'Force DNS to use local DNS servers', 'dns forward disable dnssec' =3D> 'Disable DNSSEC (dangerous)', 'dns forwarding dnssec disabled notice' =3D> '(DNSSEC disabled)', 'dns header' =3D> 'Assign DNS server addresses only for DHCP on red0', @@ -1128,9 +1130,12 @@ 'from email server' =3D> 'From Email server', 'from email user' =3D> 'From e-mail user', 'from warn email bad' =3D> 'From e-mail address is not valid', -'fw blue' =3D> 'Firewall options for BLUE interface', +'fw blue' =3D> 'Firewall options for BLUE I= nterface', 'fw default drop' =3D> 'Firewall policy', +'fw green' =3D> 'Firewall options for GREEN= Interface', 'fw logging' =3D> 'Firewall logging', +'fw logging blue' =3D> 'Firewall logging (BLUE)', +'fw logging red' =3D> 'Firewall logging (RED)', 'fw settings' =3D> 'Firewall settings', 'fw settings color' =3D> 'Show colors in ruletable', 'fw settings dropdown' =3D> 'Show all networks on rulecreation site', @@ -1675,9 +1680,9 @@ 'map to guest' =3D> 'Map to Guest', 'march' =3D> 'March', 'marked' =3D> 'Marked', -'masquerade blue' =3D> 'Masquerade BLUE', -'masquerade green' =3D> 'Masquerade GREEN', -'masquerade orange' =3D> 'Masquerade ORANGE', +'masquerade blue' =3D> 'Masquerade BLUE<= /b>', +'masquerade green' =3D> 'Masquerade GREEN', +'masquerade orange' =3D> 'Masquerade ORANGE', 'masquerading' =3D> 'Masquerading', 'masquerading disabled' =3D> 'Masquerading disabled', 'masquerading enabled' =3D> 'Masquerading enabled', @@ -1847,6 +1852,8 @@ 'november' =3D> 'November', 'ntp common settings' =3D> 'Common settings', 'ntp configuration' =3D> 'NTP Configuration', +'ntp force on blue' =3D> 'Force NTP to use local NTP servers', +'ntp force on green' =3D> 'Force NTP to use local NTP servers', 'ntp must be enabled to have clients' =3D> 'NTP must be enabled to have clie= nts.', 'ntp server' =3D> 'NTP Server', 'ntp sync' =3D> 'Synchronization', diff --git a/lfs/configroot b/lfs/configroot index c528bd6d9..6cc376ff0 100644 --- a/lfs/configroot +++ b/lfs/configroot @@ -1,7 +1,7 @@ ############################################################################= ### # = # # IPFire.org - A linux based firewall = # -# Copyright (C) 2007-2021 IPFire Team = # +# Copyright (C) 2007-2018 IPFire Team = # # = # # This program is free software: you can redistribute it and/or modify = # # it under the terms of the GNU General Public License as published by = # @@ -129,6 +129,10 @@ $(TARGET) : echo "SHOWDROPDOWN=3Doff" >> $(CONFIG_ROOT)/optionsfw/settings echo "DROPWIRELESSINPUT=3Don" >> $(CONFIG_ROOT)/optionsfw/settings echo "DROPWIRELESSFORWARD=3Don" >> $(CONFIG_ROOT)/optionsfw/settings + echo "DNS_FORCE_ON_GREEN=3Doff" >> $(CONFIG_ROOT)/optionsfw/settings + echo "DNS_FORCE_ON_BLUE=3Doff" >> $(CONFIG_ROOT)/optionsfw/settings + echo "NTP_FORCE_ON_GREEN=3Doff" >> $(CONFIG_ROOT)/optionsfw/settings + echo "NTP_FORCE_ON_BLUE=3Doff" >> $(CONFIG_ROOT)/optionsfw/settings echo "POLICY=3DMODE2" >> $(CONFIG_ROOT)/firewall/settings echo "POLICY1=3DMODE2" >> $(CONFIG_ROOT)/firewall/settings echo "USE_ISP_NAMESERVERS=3Don" >> $(CONFIG_ROOT)/dns/settings diff --git a/src/initscripts/system/dnsntp b/src/initscripts/system/dnsntp new file mode 100644 index 000000000..54fdfc685 --- /dev/null +++ b/src/initscripts/system/dnsntp @@ -0,0 +1,43 @@ +#!/bin/sh +######################################################################## +# Begin $rc_base/init.d/dnsntp +# +# Description : dnsntp init script for DNS/NTP rules only +# +######################################################################## + +# flush chain +iptables -t nat -F DNS_NTP_REDIRECT + +eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings) +eval $(/usr/local/bin/readhash /var/ipfire/optionsfw/settings) + +# Force DNS REDIRECTs on GREEN (udp, tcp, 53) +if [ "$DNS_FORCE_ON_GREEN" =3D=3D "on" ]; then + iptables -t nat -A DNS_NTP_REDIRECT -i ${GREEN_DEV} -d ${GREEN_ADDRESS} -p = udp -m udp --dport domain -j RETURN + iptables -t nat -A DNS_NTP_REDIRECT -i ${GREEN_DEV} -p udp -m udp --dport d= omain -j REDIRECT + iptables -t nat -A DNS_NTP_REDIRECT -i ${GREEN_DEV} -d ${GREEN_ADDRESS} -p = tcp -m tcp --dport domain -j RETURN + iptables -t nat -A DNS_NTP_REDIRECT -i ${GREEN_DEV} -p tcp -m tcp --dport d= omain -j REDIRECT +fi + +# Force DNS REDIRECTs on BLUE (udp, tcp, 53) +if [ "$DNS_FORCE_ON_BLUE" =3D=3D "on" ]; then + iptables -t nat -A DNS_NTP_REDIRECT -i ${BLUE_DEV} -d ${BLUE_ADDRESS} -p ud= p -m udp --dport domain -j RETURN + iptables -t nat -A DNS_NTP_REDIRECT -i ${BLUE_DEV} -p udp -m udp --dport do= main -j REDIRECT + iptables -t nat -A DNS_NTP_REDIRECT -i ${BLUE_DEV} -d ${BLUE_ADDRESS} -p tc= p -m tcp --dport domain -j RETURN + iptables -t nat -A DNS_NTP_REDIRECT -i ${BLUE_DEV} -p tcp -m tcp --dport do= main -j REDIRECT +fi + +# Force NTP REDIRECTs on GREEN (udp, 123) +if [ "$NTP_FORCE_ON_GREEN" =3D=3D "on" ]; then + iptables -t nat -A DNS_NTP_REDIRECT -i ${GREEN_DEV} -d ${GREEN_ADDRESS} -p = udp -m udp --dport ntp -j RETURN + iptables -t nat -A DNS_NTP_REDIRECT -i ${GREEN_DEV} -p udp -m udp --dport n= tp -j REDIRECT +fi + +# Force DNS REDIRECTs on BLUE (udp, 123) +if [ "$NTP_FORCE_ON_BLUE" =3D=3D "on" ]; then + iptables -t nat -A DNS_NTP_REDIRECT -i ${BLUE_DEV} -d ${BLUE_ADDRESS} -p ud= p -m udp --dport ntp -j RETURN + iptables -t nat -A DNS_NTP_REDIRECT -i ${BLUE_DEV} -p udp -m udp --dport nt= p -j REDIRECT +fi + +# End $rc_base/init.d/dnsntp diff --git a/src/initscripts/system/firewall b/src/initscripts/system/firewall index 1e558ee86..047946a86 100644 --- a/src/initscripts/system/firewall +++ b/src/initscripts/system/firewall @@ -218,7 +218,7 @@ iptables_init() { iptables -A INPUT -j LOCATIONBLOCK iptables -A FORWARD -j LOCATIONBLOCK =20 - # trafic from ipsecX/TUN/TAP interfaces, before "-i GREEN_DEV" accept every= thing + # traffic from ipsecX/TUN/TAP interfaces, before "-i GREEN_DEV" accept ever= ything iptables -N IPSECINPUT iptables -N IPSECFORWARD iptables -N IPSECOUTPUT @@ -242,6 +242,10 @@ iptables_init() { iptables -N WIRELESSFORWARD iptables -A FORWARD -m conntrack --ctstate NEW -j WIRELESSFORWARD =20 + # Redirecting DNS and NTP requests + iptables -t nat -N DNS_NTP_REDIRECT + iptables -t nat -A PREROUTING -j DNS_NTP_REDIRECT + # OpenVPN iptables -N OVPNINPUT iptables -A INPUT -j OVPNINPUT @@ -320,6 +324,9 @@ iptables_init() { # run captivectrl /usr/local/bin/captivectrl =20 + # run dnsntpctrl + /usr/local/bin/dnsntpctrl + # POLICY CHAIN iptables -N POLICYIN iptables -A INPUT -j POLICYIN diff --git a/src/misc-progs/Makefile b/src/misc-progs/Makefile index 7c3ef7529..229d122d6 100644 --- a/src/misc-progs/Makefile +++ b/src/misc-progs/Makefile @@ -30,7 +30,7 @@ SUID_PROGS =3D squidctrl sshctrl ipfirereboot \ wirelessctrl getipstat qosctrl \ redctrl syslogdctrl extrahdctrl sambactrl \ smartctrl clamavctrl addonctrl pakfire mpfirectrl wlanapctrl \ - setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes \ + setaliases urlfilterctrl updxlratorctrl fireinfoctrl rebuildroutes dnsntpct= rl \ getconntracktable wirelessclient torctrl ddnsctrl unboundctrl \ captivectrl =20 diff --git a/src/misc-progs/dnsntpctrl.c b/src/misc-progs/dnsntpctrl.c new file mode 100644 index 000000000..f2a3b89e3 --- /dev/null +++ b/src/misc-progs/dnsntpctrl.c @@ -0,0 +1,19 @@ +/* This file is part of the IPFire Firewall. + * + * This program is distributed under the terms of the GNU General Public + * Licence. See the file COPYING for details. + * + */ + +#include +#include "setuid.h" + +int main(void) +{ + if (!(initsetuid())) + exit(1); + + safe_system("/etc/rc.d/init.d/dnsntp >/dev/null 2>&1"); + + return 0; +} --=20 2.18.0 --===============4109497889949924057==--