Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I was doing a practice exam for RHCE , and one of the questions was
"Set up networking only during working hours ( 8:00 AM to 5:00 PM) "
How can i do this ? there is no more explanation given . The author of the exam says that
"You can limit networking to working hours using appropritae cron jobs from /etc/cron.daily"
OK OK , can i use iptables , but i think this is not the rightway to get to it though ,
Write a shell scripts to disable my output policy say at 8 am,
"iptables -P OUTPUT DROP "
and then enable it back at 5pm
"iptables -P OUTPUT ACCEPT"
I can have two crontab entries to do this, one at 5pm and the otherone at 8am.
I know this will work , but is there an easier way ??
Quote:
Originally posted by lionking_x Hi
i have used crontab for many other tasks ,
WHAT do i SPECIFICALLY do to disable networking ??? some service ? can you be more specific please ?
sure you can do this with redhat , you can disable the eth0 card , infact the entire "network" service which might involve all the network cards including the loopback card too, lo .
I sure thought abt this ,dont know why i did not use this solution , cant think of the reason now.
thanks , its a low grading question, so this must be it.
Thanks
Quote:
Originally posted by visaris I'm not sure about RedHat, but gentoo has some scripts in /etc/init.d.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.