can i block ports with Terminal?

well… to all of you who read the previous post: i’m sorry.
i researched a little and found that i could block some ports in order to disable the use of some particular apps ( WoW and MSN ).
is there a way to do this with Terminal or Applescript?
i know i can go to the Admin Panel of the router, but i wanted to create an app for it. first, so i could experiment more and practice my “coding” and second so i can automate the process to happend at some time, or in intervals and such.

another question…
could i block some particular ports to some particular IP address?
i mean… suppose you have 2 computers on your lan… you want to have port 123 blocked, but you want to have it unblocked.
is it posible?
( if this is too advanced, please tell me, i’m just thinking out loud ).

thanks to all!!

As far as I know, you can only control ports on your own machine (e.g with the built-in firewall ipfw)
unless you use remote tools like Apple Remote Desktop, but does ARD work with a client PC?

Maybe, If you’re able to control the router.

Happy GUI-scripting :smiley:

If you have an admin username and password for the router (usually at you can use Safari (or curl) to read the form data it returns and turn it off with some javascript. To switch pages in the router html page is also possible, but not trivial; again requiring that you interact with its buttons.