|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Enabling A Connection Between Certian Hours
Is there a way to bring up/down interfaces for different hours of the day?
I am looking to make eth1 up between the hours of 8am and 11pm. Can someone please help me in doing this. Thanks in advance! |
|
|||
Quote:
Quote:
Although the following article was written to address FreeBSD, cron is pretty standard across most Unix derivatives, & hey, it is written by Dru Lavigne, & anything from Dru Lavigne is noteworthy. http://www.onlamp.com/pub/a/bsd/2000...cs.html?page=1 And when it comes to OpenBSD, always correlate information back to what can be found in the manpages. Last edited by ocicat; 25th June 2014 at 09:46 PM. |
|
|||
i am comfortable with ifconfig eth1 up and ifconfig eth1 down but the cron i have never done before so i will read up on it now
is there any security risk in having cron tab running in the background? or is it always running anyways? Last edited by EverydayDiesel; 25th June 2014 at 10:11 PM. |
|
|||
Quote:
There is no risk unless you enter a command you aren't entirely certain you know what it does. But this is not exclusive to cron. |
|
|||
Looking at root's crontab:
Code:
$ sudo crontab -l -u root < # SHELL=/bin/sh PATH=/bin:/sbin:/usr/bin:/usr/sbin HOME=/var/log # #minute hour mday month wday command # # sendmail clientmqueue runner #*/30 * * * * /usr/sbin/sendmail -L sm-msp-queue -Ac -q # # rotate log files every hour, if necessary 0 * * * * /usr/bin/newsyslog # send log file notifications, if necessary #1-59 * * * * /usr/bin/newsyslog -m # # do daily/weekly/monthly maintenance 30 1 * * * /bin/sh /etc/daily 30 3 * * 6 /bin/sh /etc/weekly 30 5 1 * * /bin/sh /etc/monthly #0 * * * * sleep $((RANDOM \% 1800)) && /usr/libexec/spamd-setup $ |
|
|||
This is a great forum. Thanks for all the help.
One last question. How can in ensure that the interface is down when the system boots? |
|
||||
The netstart(8) script is invoked by rc(8) at boot. If you do not want your interface operational at boot, either do not have a defined /etc/hostname.<if> for the interface, or, have one that merely includes the word "down" on a single line.
|
|
|||
if i dont have a defined /etc/hostname.<if> and i create one with crontab, will the OS know to start using that interface or will I have to restart a service for it to read the new hostname file?
|
|
||||
Consider:
No gyrations with network interface configurations would be needed if you elected to control access using PF -- and if you think about it, that's what PF is for. In the book's example, the contributor controlled the time window for internet access for a single workstation .. but you could do the same for an entire subnet, just as easily. |
|
||||
Here's a PF configuration suggestion, as follow-up. Use PF's Anchor facility.
See http://www.openbsd.org/faq/pf/anchors.html |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help Enabling Cisco VPN Client Traffic on PF | EverydayDiesel | OpenBSD Security | 5 | 26th February 2013 06:07 PM |
enabling linux binary emulation .. could it harm ? | daemonfowl | OpenBSD Security | 7 | 30th July 2012 02:20 PM |
US e-voting system cracked in less than 48 hours | J65nko | News | 0 | 6th March 2012 01:52 AM |
Working dial-up connection - No Client Connection | vigol | FreeBSD General | 5 | 22nd November 2009 10:59 PM |