[SOLVED] Activate inetd at startup.
-
Hello,
Situation:
Im a trying to active a timeprotocol server, rfc 868 compliant. I made the pfsense the authoritative time server of my lan with NTP.
I want to get managable switch get the time too. Some high quality switch like HP 2510, or HP 4000M can read NTP time via unicast SNMPv3 query. Some older switch or cheap one (like HP 2524, or TPLink, dlink) can only read "TIMEP" timestamp (rfc 868)…Needs:
TIMEP protocol can be easy activated on UNIX systems with the "internet superserver" : inetd.
So I uncommented on /etc/inetd.conftime stream tcp nowait root internal time dgram udp wait root internal
Problem i cant activate the daemon him self… The FREEBSD how - to says to place a system var called inetd_enable to YES.
Placing: inetd_enable="YES" into /etc/rc.conf will enable or disable inetd starting at boot time. The command: /etc/rc.d/inetd rcvar can be run to display the current effective setting.
Problem the way pfsense is packaged is not this way. The file rc.conf does not exist and is ignored even if i fill it with inetd_enable.
The only way I found is to manually shell execute inetd ( #/usr/sbin/inetd ) so I got my needs.
HELP NEEDED:
Can you please help me to activate the inet daemon at boot like a normal daemon without having to it manually ? Or give me explanation on how the rc scripts works ?/etc/rc.d/inetd start
does nothing
And /etc/rc.d/inetd rcvar says always inetd_enable="NO" even with inetd_enable="YES" into /etc/rc.conf
-
I believe it's /usr/local/etc/rc.d/ you place your .sh
#!/bin/sh
/usr/sbin/inetdchmod 744 the file
-
Running inetd on your firewall is a bad idea. There's a good reason it was disabled in pfSense. Also, pfSense comes with OpenNTPD already set up and ready for you to use. Everything you're doing is at odds with what is already up and working great. Take a look under Services in the webGUI.
-
I believe it's /usr/local/etc/rc.d/ you place your .sh
#!/bin/sh
/usr/sbin/inetdchmod 744 the file
pwd && ls -l
/usr/local/etc/rc.d
total 8
-rwxr-xr-x 1 root wheel 357 Dec 3 00:31 inetd.sh
-rwxr-xr-x 1 root wheel 2878 Oct 14 09:06 proxy_monitor.sh
-rwxr-xr-x 1 root wheel 431 Oct 14 09:06 squid.shAnd tryed your simple, script. Still no execution at startup.
I thinks I have maybe to some file somewere to activate the execution of "inetd.sh". Could someone give me hints ? :)I googled the folder /usr/local/etc/rc.d
and found that : http://www.freebsdwiki.net/index.php/Usr/local/etc/rc.d
I'll try that script syntax.submicron I know OpenNTPD and I use it perfectly ! But as I said some of my managables switchs (HP2524, and Dlink) can only get time via rfc 868 time protocol and not NTP time.
-
I can see it running with ps -ax | grep inetd
Extra info from the webgui http://your_pfsense_ip/status.php
hmm could it be that you used admin and not root as user? -
Well, err… My bad...
You're right perry, many thanks. I got an issue in the script with and semi-colon i added... Now the SH script is ok. ;) And is correctly executed at startup.
He must be executed correctly before, but did not ran inetd because of syntaxes errors.
Many and HUGE thanks. And btw thanks for the status.php page, didn't knew about it.