Network config control by cron

Rick Stevens rstevens at vitalstream.com
Fri Jul 2 16:35:05 UTC 2004


Bob McClure Jr wrote:
> On Fri, Jul 02, 2004 at 06:52:48AM -0700, Al Gelders wrote:
> 
>>Where do I look to find out how to activate and deactivate my ppp
>>network interface using cron?  These days auto disconnect doesn't work
>>because my system is getting pinged every few seconds by  hackers (I
>>presume).
>>-- 
>>al gelders
>>agelders at lightspeed.net
> 
> 
> How about blocking pings with your firewall?

That's one option.  To shut it down via cron, add this to root's
crontab:

	m h * * * /sbin/ifdown ppp0

where "m" = the minute you want it shut down and "h" = the hour you
want it down.  E.g. to shut it down at 2:30 p.m.

	30 14 * * * /sbin/ifdown ppp0
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-           grep me no patterns and I'll tell you no lines           -
----------------------------------------------------------------------





More information about the Redhat-install-list mailing list