Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Firewall rules, groups - confusing!

Hi all,


I am trying to setup firewall on my Macmini server 10.6.7. Hope you could help me clarify below issues:

- By default I got "any group", "10-net group", "129.168-net group" and "192.168.1-net group". Should I delete all and just keep 192.168.1-net group? if keep, which check box I have to tick to enable services?

- Is it a right way when I tick all "Deny rule" in Advance tab and then open service by service in Services tab?


Thanks and looking forward to your respond!

Posted on Apr 28, 2011 4:02 AM

Reply
Question marked as Best reply

Posted on Apr 28, 2011 6:18 AM

Those are IP subnets, and those groups select the originating IP address for the incoming connection.


Your network looks to be using the 192.168.1.x/24 subnet. Which is common. Unfortunately, the common subnets are also very bad choices if you decide to use VPNs in the future.


Ok, your "10-net group", "129.168-net group" and "192.168.1-net group" should probably be "10-net group", "192.168-net group" and "192.168.1-net group" (typo in there), and you'll find that is the 10.0.0.0/8 subnet, and the 192.168.0.0/16 block, and the 192.168.1.0/24 block.


Here are the three private IP address blocks:


  • 10.0.0.0 to 10.255.255.255, also called 10.0.0.0/8
  • 172.16.0.0 to 172.31.255.255, also known as 172.16.0.0/12
  • 192.168.0.0 to 192.168.255.255, also known as 192.168.0.0/16


You'll generally have a subnet within these blocks, but we'll skip the IP subnet introduction for now and point to the use of "10-net group" to point to any incoming address in 10.0.0.0/8; connections from addresses 10.0.0.1 to 10.255.255.254. "192.168-net group" is 192.168.0.1 to 192.168.255.254, and "192.168.1-net group" is 192.168.1.1 to 192.168.1.254.


You can read the Wikipedia article on this IP addressing stuff but (and I've been tussling with IP for a very long time) it's surprisingly dense reading. (It's entirely correct, but it's written for IP nerds and not really for IP newbies.) If you don't bother reading that (and I would not blame you), then just remember you can't use the .0 and .255 addresses within any particular subnet; the ranges I show above reflect that, though technically the .0 and .255 addresses are within the ranges, and you probably want to configure your network out of the 192.168.0.1 to 192.168.0.254 and 192.168.1.1 to 192.168.1.254 subnets if you might ever need to use VPNs.


Now these private addresses should generally not be active on the public internet and should not be passing default router configurations, and so these should be LAN local. There are cases of ISPs using these blocks and issuing addresses from here for all private LANs managed by that ISP, so there's no solid rule of what you might see; there are various ISP schemes and even more local LAN schemes and permutations.


So the answer to your question is... Do you know what IP addresses will be referencing and reaching your server? If so, then yes, you can delete those groups that you are not using. But I'd probably leave the groups alone (at least for now), and just select the services within each (that your network is not using) for no traffic. Which is the "don't delete" answer.


I also typically recommend acquiring and installing an external gateway firewall box and not running a Mac as a gateway, as that makes networking (far) easier, and (if you purchase a gateway firewall with server-oriented features, or use one of the available open-source options with server-oriented features) you can connect via external VPN to your firewall to allow remote (in-bound) access into your network. That also means you have less traffic hitting your server-local firewalls.


I'd suggest some introductory reading on IP networking and DNS services, as they're essential to operating a server.

9 replies
Question marked as Best reply

Apr 28, 2011 6:18 AM in response to thanhlp

Those are IP subnets, and those groups select the originating IP address for the incoming connection.


Your network looks to be using the 192.168.1.x/24 subnet. Which is common. Unfortunately, the common subnets are also very bad choices if you decide to use VPNs in the future.


Ok, your "10-net group", "129.168-net group" and "192.168.1-net group" should probably be "10-net group", "192.168-net group" and "192.168.1-net group" (typo in there), and you'll find that is the 10.0.0.0/8 subnet, and the 192.168.0.0/16 block, and the 192.168.1.0/24 block.


Here are the three private IP address blocks:


  • 10.0.0.0 to 10.255.255.255, also called 10.0.0.0/8
  • 172.16.0.0 to 172.31.255.255, also known as 172.16.0.0/12
  • 192.168.0.0 to 192.168.255.255, also known as 192.168.0.0/16


You'll generally have a subnet within these blocks, but we'll skip the IP subnet introduction for now and point to the use of "10-net group" to point to any incoming address in 10.0.0.0/8; connections from addresses 10.0.0.1 to 10.255.255.254. "192.168-net group" is 192.168.0.1 to 192.168.255.254, and "192.168.1-net group" is 192.168.1.1 to 192.168.1.254.


You can read the Wikipedia article on this IP addressing stuff but (and I've been tussling with IP for a very long time) it's surprisingly dense reading. (It's entirely correct, but it's written for IP nerds and not really for IP newbies.) If you don't bother reading that (and I would not blame you), then just remember you can't use the .0 and .255 addresses within any particular subnet; the ranges I show above reflect that, though technically the .0 and .255 addresses are within the ranges, and you probably want to configure your network out of the 192.168.0.1 to 192.168.0.254 and 192.168.1.1 to 192.168.1.254 subnets if you might ever need to use VPNs.


Now these private addresses should generally not be active on the public internet and should not be passing default router configurations, and so these should be LAN local. There are cases of ISPs using these blocks and issuing addresses from here for all private LANs managed by that ISP, so there's no solid rule of what you might see; there are various ISP schemes and even more local LAN schemes and permutations.


So the answer to your question is... Do you know what IP addresses will be referencing and reaching your server? If so, then yes, you can delete those groups that you are not using. But I'd probably leave the groups alone (at least for now), and just select the services within each (that your network is not using) for no traffic. Which is the "don't delete" answer.


I also typically recommend acquiring and installing an external gateway firewall box and not running a Mac as a gateway, as that makes networking (far) easier, and (if you purchase a gateway firewall with server-oriented features, or use one of the available open-source options with server-oriented features) you can connect via external VPN to your firewall to allow remote (in-bound) access into your network. That also means you have less traffic hitting your server-local firewalls.


I'd suggest some introductory reading on IP networking and DNS services, as they're essential to operating a server.

Apr 28, 2011 6:59 AM in response to MrHoffman

Hi Hoffman,


Thanks for your reply, always detail and helpful!


Just want to be sure that I understand you correctly: when I do not host any website and do not use VPN, I can uncheck all service of "any group", "10-net group" (I deleted "192.168-net group")?


And for sure I will upgrade to an firewall box in future if need. But now I would like to give Macmini a chance!



Thanks very much for your time!

Apr 28, 2011 9:58 AM in response to thanhlp

Just want to be sure that I understand you correctly: when I do not host any website and do not use VPN, I can uncheck all service of "any group", "10-net group" (I deleted "192.168-net group")?


What address block does your local LAN use? You likely don't want to block that. Otherwise, have at.


(And again, I don't recommend deleting configuration settings.)


How good are your backups? That's your path back from either errant deletion, storage hardware failures and security breaches. That's full-disk backups, as well as at least a couple of copies of older backups kept over time, so you can go back in history if the most recent backups are somehow corrupt or have also been breached, too.


And for sure I will upgrade to an firewall box in future if need. But now I would like to give Macmini a chance!


Google around the forums for previous experiences with this configuration. While it's possible to get the gateway configuration to work, there are many folks that have had issues with this setup and (if you're not very cautious with your settings) you can end up opening your server to attacks due to misconfigurations, or open ports and vulnerabilities through (insecure) software installations on the server. Mac boxes just don't make very good gateways, nor good routers.

Apr 28, 2011 9:58 PM in response to MrHoffman

Hi Hoffman,


Sorry if I not very clear in beginning. Here is my setup:


- Internet ------ Modem/Router (10.0.0.1) ------- Ethernet card of Mac (static 10.0.0.60)------ Firewall ------ USB ethernet card (192.168.1.1) ----- LAN (192.168.1.1 -> 192.168.1.63)



Groups:


1. "any group": any


2. "10-net group": 10.0.0.0/8


3. "Work group": 192.168.1.0/26 (I create this, it has range from .1 to .63)



DHCP config:


only one subnet from 192.168.1.20 to 192.168.1.63,



Static IP config:


The address from 192.168.1.1 to 192.168.1.10 for server and base station,

192.168.1.10 to 192.168.1.20 is for printer



Firewall config:


1. "Any group": enable first 4 services and "IGMP- intenet group management protocol" service, "ICMP - require type only" service


2. "10-net group": same as "any group"


3. "Work group": Mail, DHCP, FTP, HTTP, SQL... service enable as needs



Firewall advance config:

User uploaded file


Please advise, thanks very much for your time!

Apr 29, 2011 2:16 PM in response to thanhlp

I wouldn't use your Mac as a gateway router if that's what you are up to here. That gets ugly. You'll either have to use NAT or subnet routing.


If there's double NAT here, that is likely going to cause network problems. Do remove that at your first convenience.


And FWIW, ftp also needs the ephemeral ports open. It's also wildly insecure, and entirely allergic to firewalls.

Apr 30, 2011 1:58 AM in response to MrHoffman

OK I see, I also feel very uncomfortable when I see NAT in modem and NAT in server running parallel, may be that is reason for NAT on server unstable? I will follow up your comment to create a PPPoE service direct on server, not on modem and let see.


I would like to ask if you not use Mac as a router then how is your network setup? Sorry for this newbee question!


PS: Thanks very much for your comment about FTP port, I will turn it off, thanks!

Apr 30, 2011 9:55 AM in response to MrHoffman

MrHoffman wrote:


I wouldn't use your Mac as a gateway router if that's what you are up to here. That gets ugly.


Thanks Hoffman, but when you mention use a separate router, what kind of router? up to 10.000 USD or just hundreds USD?. I just look through some spec and price but I really do not know which one to choose! Because I very limited knowhow in this field.


I did also read through your node regarding selection router, firewall but still got no clue which one I have to buy and how much. Could you more specify on this?


I not host website so not care much about attack out to inside, I do care more about control the bandwidth, P2P download... to get web browsing and email work all time.

Apr 30, 2011 2:26 PM in response to thanhlp

The routers I generally install and operate are generally priced around US$250 to US$500, and available from various vendors. Here are some considerations when picking a firewall; what I look for, and why.


Options include D-Link DFL-series, as well as Cisco RV042/RV082 series, among (many) others. For some applications, open source options including Vyatta, M0n0wall, Smoothwall and pfSense, if you have a spare x86 box and NICs that are supported by one or more of these packages.

Firewall rules, groups - confusing!

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.