|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > Linux Help > Internet Access |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|