Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 23rd, 2002, 10:56 AM
nickwinters nickwinters is offline
Web Geek
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Posts: 62 nickwinters User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 17 m 25 sec
Reputation Power: 7
Internet Access

Right now I have a network of windows 2000 computers and a computer running linux is connected to the net. Each win2k has a unique IP. How do I make it so certain ips can only access the net (but still have pop3 access, which is on linux computer) at certain times of day?

-Nick

Reply With Quote
  #2  
Old July 23rd, 2002, 12:59 PM
M.Hirsch M.Hirsch is offline
Contributing User
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Oct 2000
Location: Back in the real world.
Posts: 5,969 M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level)M.Hirsch User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Month 1 Day 22 h 42 m 50 sec
Reputation Power: 184
make cron entries like this:

0 8 * * * /usr/local/bin/reconfig_firewall.sh morning
0 12 * * * /usr/local/bin/reconfig_firewall.sh afternoon
0 14 * * * /usr/local/bin/reconfig_firewall.sh morning

(starts this script at 08:00, 12:00 and 02:00pm)

and in /usr/local/bin/reconfig_firewall.sh
Code:
#!/bin/sh
case "$1" in
morning)
# only me and my boss are allowed to access the net
  ipchains -F forward
  ipchains -P forward DENY
  ipchains -A forward -s 192.168.1.1 -d 0/0 -j ACCEPT
  ipchains -A forward -s 192.168.1.2 -d 0/0 -j ACCEPT
  ;;
afternoon)
# anyone can access the net during noon break
  ipchains -F forward
  ipchains -P forward DENY
  ipchains -A forward -s 192.168.1.0/24 -d 0/0 -j ACCEPT
  ;;
*)
  echo "Syntax: $0 morning|afternoon"
esac

do you get the idea?
(services on the box (=pop3) are not affected by the "forward" chain.)
__________________
--
Manuel Hirsch - Linux, FreeBSD, programming, administration articles, tutorials and more.

Last edited by M.Hirsch : July 23rd, 2002 at 01:01 PM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Internet Access


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT