On 3 Apr 2006 10:45:17 -0700, "DevNull" <(E-Mail Removed)> wrote:
>I am a networking novice, researching which may be easier/better, IPCop
>vs iptables to accomplish my goals of limiting Internet access:
> 1. by MAC address
> 2. by port request.
>
>#2 means:
> user1 only gets Internet email, with no other Internet access.
> user2 gets none.
> user3 gets email, browsing, FTP, etc.
>
>Can IPCop get this granular?
>
>Thanks in advance.
Here at work we use an access control list where, by IP (could also be
by MAC if desired but users can alter the MAC), a user is granted
certain ports and "everything" else is denied. You can FTP the
iptables script from here
ftp://yesican.chsoft.biz/pub/lartc/firewall.sh.tar.gz
Look for ACL
And here are the lines from /etc/firewall/ACL for one user:
192.168.1.60;tcp;1024:65535;-m mport --dports;53,80,443 # tape
192.168.1.60;tcp;1024:65535;--dport;1024:65535
192.168.1.60;udp;1024:65535;--dport;1024:65535
As you can see, user "tape" gets to surf. Cannot send or receive
mail, FTP, Etc.
BEWARE: File sharing programs use high ports for the entire connection
so this won't stop that. You could alter the ACL entries so that
ESTABLISHED connections are allowed or that NEW connections initiated
on high ports are rejected or dropped.
NOTE also that UDP is not restricted on high ports.
Plain English DISCLAIMER: Use this as a template and test your setup
when you think you have correctly configured everything. If it
breaks, you get to keep the pieces; I refuse to be held responsible.
HTH,
buck