 |
 |
Closing connections to an IP using OS X Firewall
|
 |
|
 |
|
Professional Poster
Join Date: Jul 2003
Location: Canada
Status:
Offline
|
|
How do I use the firewall to block connections to certain IP addresses?
I see I can block ports, but not a particular IP.
thanks
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
Originally posted by brapper:
How do I use the firewall to block connections to certain IP addresses?
I see I can block ports, but not a particular IP.
thanks
Something like:
Code:
ipfw add 98 deny tcp from 167.205.21.60 to any
for incoming and
Code:
ipfw add 99 deny tcp from any to 167.205.21.60
for outgoing. Not tested, but that should work.
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jul 2003
Location: Canada
Status:
Offline
|
|
Originally posted by Arkham_c:
Something like:
Code:
ipfw add 99 deny tcp from any to 167.205.21.60
for outgoing. Not tested, but that should work.
Thanks for the quick reply Arkham,
I am trying block outgoing connections so I tried the second code you listed and inserted the ip address i wanted to block, but im getting "ipfw: socket: operation not permitted.
Any ideas?
|
|
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jul 2003
Location: Canada
Status:
Offline
|
|
alright, I typed sudo before the code you gave me this time (i'm clueless in unix.) It prompted me for my password, i gave it my administrator's password and it then said "00099 deny tcp from any to xxx.xx.xxx.xxx"
does that mean mission accomplished?
If so, will the settings remain after a restart or will i have to enter that every time i need it?
thanks again.
|
|
|
| |
|
|
|
 |
|
 |
|
Clinically Insane
Join Date: Nov 1999
Status:
Offline
|
|
Originally posted by brapper:
alright, I typed sudo before the code you gave me this time (i'm clueless in unix.) It prompted me for my password, i gave it my administrator's password and it then said "00099 deny tcp from any to xxx.xx.xxx.xxx"
does that mean mission accomplished?
If so, will the settings remain after a restart or will i have to enter that every time i need it?
Mission accomplished, but it won't persist across restarts.
Apple's built-in firewall is quite powerful, but the interface they provide barely scratches the surface of what it can do. For something more powerful, I'd suggest Brian Hill's excellent BrickHouse.
|
|
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Dec 2001
Location: Atlanta, GA, USA
Status:
Offline
|
|
BTW, If you type:
It will list all the ipfw rules currently in place.
You can make your rules persist by creating a StartupItem and putting them in it. If you want to go down that road, here is a link to some documentation on how to do that:
http://developer.apple.com/documenta...rtupItems.html
|
|
Mac Pro 2x 2.66 GHz Dual core, Apple TV 160GB, two Windows XP PCs
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Jul 2003
Location: Canada
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|