Mac OS X Server 10.6 Snow Leopard: DNS and Network Services

Mac OS X Server 10.6 Snow Leopard: DNS and Network Services

with Sean Colins

 


In Mac OS X Server 10.6 Snow Leopard: DNS and Network Services, instructor Sean Colins introduces the networking services available in Snow Leopard Server. This course covers setting up a DNS server to provide network resources, using firewalls to protect systems against intrusion and to route traffic, using DHCP to automatically configure network settings for computers when they join a network, and accessing a network securely via a remote VPN (virtual private network) connection. Exercise files accompany the course.
Topics include:
  • Deploying, troubleshooting, and understanding OS X 10.6 DNS server
  • Understanding and configuring OS X and OS X Server-based firewalls
  • Fixing server- and client-side firewalls
  • Configuring and troubleshooting DHCP
  • Setting up and troubleshooting a VPN server

show more

author
Sean Colins
subject
Business, Developer, Servers
software
Mac OS X Server 10.6
level
Intermediate
duration
2h 4m
released
Jul 16, 2010

Share this course

Ready to join? subscribe


Keep up with news, tips, and latest courses.

submit Course details submit clicked more info

Please wait...

Search the closed captioning text for this course by entering the keyword you’d like to search, or browse the closed captioning text by selecting the chapter name below and choosing the video title you’d like to review.



Introduction
Welcome
00:04I'm Sean Colins, and this is Mac OS X Server DNS and Network Services.
00:09This course presents you with an excellent opportunity to quickly and easily
00:14understand the networking concepts that typically elude people.
00:18We start with DNS because DNS is my number one source of student questions and
00:23it's the first service you must set up for Mac OS X Server to work correctly.
00:28DNS is there to help you locate resources on networks, varying in size from the
00:33very small to the largest network in the world, the Internet.
00:36Together, we'll set it up and tear it apart, until you understand it inside and out.
00:41Next, we'll explore firewall technology, which is designed to protect your
00:45computer and your network from intruders, and to help move traffic around our
00:50increasingly complex networks.
00:52After firewalls, it makes sense to talk about DHCP, which makes configuration of
00:57many devices on a network very easy.
01:00DHCP gives you power, but with any power comes responsibility and we'll talk about both.
01:05Once you have DNS, a firewall, and DHCP enabled on your network, you're ready
01:11for the security and remote accessibility provided by a VPN.
01:15I'll show you how to set one up properly and we'll talk about which level of
01:19security is right for you and your organization.
01:21Of course, with subjects this complicated, something is bound to go wrong somewhere.
01:26So I will lead you through the most effective and efficient ways to troubleshoot
01:30each of these services when things don't work exactly as you want.
01:33Even though your server will nearly configure itself, to learn any of this
01:37we're going to have to roll up our sleeves and get to work.
01:40So please, join me now as we begin in Mac OS X Server DNS and Network Services.
Collapse this transcript
Understanding this course and the exercise files
00:01In this course, we have two computers you will see repeatedly.
00:04One is our server which has a gray desktop and the other is our recording
00:08machine, which is our client, and it has a blue desktop.
00:12You will see us use Apple Remote Desktop to flip back and forth between them in some movies.
00:16So please don't be alarmed.
00:17That's completely normal.
00:19Because this course explores and reconfigures Network Services both on the
00:23client and on the server, it's a really good idea to have a monitor and a
00:27keyboard, and a mouse hooked up to not only your client machine, but also the server.
00:32Normally, I'd say you don't need to configure your server locally, because we
00:35have such robust network tools, but you're learning here and you are likely to
00:39configure something somewhere along the way that will make it difficult or
00:42impossible to connect remotely to your server.
00:45In which case, you'll be slowed down while you hunt down the equipment to hook
00:48up to get to a local connection again.
00:51In fact, I've purposely included a configuration in this course that will
00:55disable communication between the client and server, which we then
00:58troubleshoot and correct.
00:59You will not be able to follow the troubleshooting steps on your equipment if
01:02you don't have a local connection to the server available.
01:06Please remember not to follow this course using a server in a live
01:10production environment.
01:12In fact, do not do anything in this class on a system that is connected to
01:16an existing network.
01:18Because we will be enabling DHCP during this class, we will disrupt your other
01:22network devices almost certainly when you turn that service on.
01:27For our purposes, we used a D-Link wireless router, in fact, the cheapest we
01:31could find, because we believe that you will probably go out and try to find the
01:35cheapest router you can use as test equipment.
01:37We configured it specifically to have NAT turned on and DHCP turned off in the router.
01:44We configured the WAN interface with our public IP address and we configured
01:47the LAN interface with the router's address you will see throughout the title,
01:51192.168.12.1. Our server is at address 192.168.12.2.
01:59I recommend that you set up your network before you install the server software
02:03necessary to follow this course.
02:05If your router and cabling are set up correctly before you begin, the entire
02:09process of taking this course will be much more productive for you.
02:13If you are not a premium subscriber, you won't have access to the exercise files,
02:16but for this course, that only includes saved preferences for Server
02:20Admin and a VPN configuration file which I use in the VPN movie later in this course.
02:25After you take the course, you can submit questions to ts@lynda.com where I and
02:31my team of server experts will be happy to respond to your questions.
02:35If you ask something unique and clever, we may ask your permission to post your
02:39question and the answer to our technical articles blog, which is available to
02:43everyone at www.corequick.com/groups/articles.
02:49You can also find us on Facebook at the www.facebook.com/corequick.
02:54Now, get settled in, get your popcorn ready, and let's get started!
Collapse this transcript
1. DNS
What is DNS and how does it fit into your server puzzle?
00:00There are many misconceptions about DNS.
00:03Do you need or want DNS?
00:06Funny thing about the word need. You don't really need DNS unless you're running
00:11mail or directory services.
00:14But when you start talking about want, now there is an interesting word.
00:18You might want DNS for several reasons.
00:21But I bet the best reason is to make something easier.
00:24That's what DNS does;
00:26it makes much of what you do with a computer easier.
00:30Have you noticed how much your iPad wants to be connected to a network?
00:35How about web browsing or getting onto a social service like Facebook so you can
00:40easily interact with people?
00:42None of that would be easy without DNS. So what is DNS?
00:47Really, it's just a system to match numbers to names and names to numbers on
00:54a computer network. It's that simple.
00:56Computers find their way around using numbers.
00:59People find it a lot easier to work with names.
01:02So, DNS was invented to make life easier for people.
01:06Now, when I say numbers, I mean addresses.
01:09At the moment, we all use IPv4 addresses on our computers, our routers,
01:15our printers, etcetera.
01:17So, the number part of the equation is going to be something that looks like this,
01:21where we replace the pound symbols with actual numbers.
01:26Each of those four segments is called an octet, and each octet can only be the number 0-255.
01:31There is a lot more to it than that, but this gives you the basic idea.
01:38When I say names in this context, I mean fully qualified domain names.
01:43Fully qualified is a very specific way to refer to a name that means full name.
01:50It's kind of like saying my name is Sean.
01:52That's my host name. Or saying my name is Sean Matthew Colins.
01:57That's my fully qualified domain name.
01:59Well, not really, but you get the idea.
02:02The fully qualified domain name is the complete name with nothing more to add.
02:07Now, if I had a dog named Scruffy Colins, Scruffy would be the dog's host name,
02:13Scruffy Colins would be my dog's fully qualified domain name, and Colins would
02:18be the domain or the zone name.
02:20So, within the domain Colins, I have hosts named Sean, Matthew, and Scruffy, and
02:27I could have more if I wanted to add my wife and kids to the zone file.
02:31If I changed that analogy to a more literal representation, I could actually
02:36name computers after everyone in my family.
02:38So, mine could be Sean.Matthew.Colins, and my dog's could be Scruffy.Colins.
02:45So, how does your request for Scruffy Colins get to where it's intended?
02:51That has more to do with the DNS system than the names and the numbers.
02:55You see, to make all of those matches, something needs to have the matching
03:00names and numbers in a system that can answer your questions.
03:05That system is the DNS system and it's huge.
03:10The DNS or Domain Name System starts at 13 root servers, which are actually
03:16clusters of servers.
03:18Those 13 root servers are managed by the organization responsible for DNS on the Internet.
03:25Everything in the DNS system is listed at various levels of a chain of
03:30interconnected DNS servers, each DNS server talking to servers above and
03:36below in the hierarchy.
03:39It's very complicated, but actually, kind of cool when you think about it.
03:43The DNS system is a fantastic example of international cooperation and adherence
03:48to rules that make a very complicated system very stable.
03:53I don't know about you, but I don't know of too many complicated things that
03:56are also very stable.
03:58So, a zone is just your little corner of the DNS universe.
04:03It's going to be a name that is either private to only your network, or it's
04:07something that is public that you purchased from a domain name registrar.
04:11Sometimes, you can have two zones with the same name but different information.
04:17That's called Split DNS.
04:19And we'll talk about that later on.
04:21A DNS zone is essentially a file on a computer that contains records.
04:25Your DNS zone is a namespace for which you own authority.
04:31So you can do whatever you want with it.
04:33An A record is one entry, or item in that zone.
04:38An A record just maps a name to a number.
04:41A PTR record does the opposite, mapping a number to a name.
04:45An MX record is responsible for sending mail to a specific machine for delivery.
04:51A CNAME is kind of like an alias.
04:53It lets the machine it references go by another name, but that machine keeps
04:58its original identity too.
05:00Now that you know what DNS is, how it fits into your world, and what the major
05:04pieces and bits look like, let's dig in and see how to make it work.
Collapse this transcript
DNS prerequisites
00:01To complete this course, you're going to need some things to be finished before
00:04you start each chapter.
00:06DNS being the first in our services, we're really not going to have too many
00:10things that are necessary in order to get this set up, but there are some things
00:14you should be aware of.
00:14First, you're going to need Snow Leopard Server.
00:16You have to have the software and a computer to run it on and you probably want
00:20to have a client set up as well, so that you can test your DNS setup between
00:25your client and your server.
00:27It can also be helpful to already have DNS set up on the Internet, but we'll
00:31talk about that later on in the course.
Collapse this transcript
Deploying DNS
00:01With DNS especially, there is an order in which you have to do things.
00:04Otherwise, you'll be chasing your tail for hours trying to get
00:06everything working.
00:07First, and this should happen well in advance of your deployment, decide on and
00:11obtain a domain name.
00:13When I think about it, this is also important to the installation of your
00:16server, because you have to know the fully qualified domain name of your server
00:20during initial setup.
00:21You get a domain name either from your network administrator.
00:24If you are setting up at a large organization where there is already a domain
00:27name, or a domain registrar, if the server will do things like route mail to
00:31other computers on the Internet, and you don't have one already.
00:35If you've watched our other server titles here at lynda.com, you'll remember
00:38that we've covered how to purchase a domain name from a registrar in the movie
00:42"Registering a Domain Name," which is in Chapter 4 of Snow Leopard Server
00:46Essential Training.
00:47Once you have your domain name, you have to set up zones.
00:49To do that, we're going to go into Server Admin.
00:52Once we're in Server Admin, it should automatically connect up to your server.
00:56If it doesn't, you can add your server by name, or IP address.
01:00You'll see here that if you've already got your server set up and you went
01:03through the automatic setup process and you didn't have DNS on your network
01:06already, it set up DNS for you.
01:09That's why it's down here in the list, and it's already got the green light next
01:12to it to say that it's running.
01:13If you look at zones, it's going to give you a warning that says "don't mess with this.
01:16You're going to change something that's going to really screw up your server."
01:19You're going to say OK, and then we're going to change it anyway.
01:23We're going to do this for a very specific reason.
01:25We need more than just server.groundswellgear.com.
01:28We need to create additional records.
01:30We want to modify what this is doing.
01:32So, we're going to add a different zone here, one that gives us a little more flexibility.
01:38For example, server.groundswellgear.com is going to be authoritative and this
01:43zone will respond authoritatively when someone asks this DNS server for anything
01:48within server.groundswellgear.com.
01:50That would include if I had another hostname before the word server.
01:54So, first.server.groundswellgear.com could be dealt with by this zone, but if
02:00I want to set up another machine record or a CNAME like for example
02:03mail.groundswellgear.com or www.groundswellgear .com, this zone isn't going to cut it for me.
02:10I can't do that here.
02:11So, I need to set up a different one.
02:13But I don't want to just delete this yet.
02:14I want to set up the other zone first, and then we'll come back and delete this afterwards.
02:18So, the first thing we do to add a zone, click the Add Zone button, and then add
02:22a primary zone here, and we're going to just add the words groundswellgear.com
02:28right here where it says Primary Zone Name.
02:31We add an e-mail and the e-mail address here is going to appear in our DNS records.
02:36This way if someone has got a problem with something we've listed in DNS,
02:39they can contact us and tell us that there's something wrong, or they need something
02:43added or removed or whatever.
02:44We're also going to add this server as Nameserver, so we'll click the Plus
02:48button and we'll save that.
02:49For the zone groundswellgear.com, the nameserver is going to be
02:53server.groundswellgear.com.
02:55All of that is fairly straightforward.
02:57The only other box we have down here is for Mail Exchangers and we'll just click
03:01the Plus button and put in the name server and a priority.
03:05The priority here is weighted downward.
03:07So, if you put in 90, that will be a lower priority than if you put in 10.
03:11On the Internet these days, whenever you're setting up MX records, you'll see a
03:14lot of registrars giving you the number 0 by default. I like using 10.
03:19Once you've got those all in place, click Save and you see here that underneath
03:23Hostname, the Mail Exchanger will autocomplete the rest of the domain name and
03:26you get your fully qualified server.groundswellgear.com.
03:29The tricky part with setting up your zones is you have to set them up locally
03:33and on the Internet if you expect your names to work in both places.
03:36This is called split DNS and it's a pretty common way to handle a domain in a SOHO network.
03:42Next, we're going to have to add DNS records to the zone.
03:46In a Split DNS setup, you'll have to do that both on the Internet and locally.
03:50If you're in education, your district IT department probably has solid
03:54control over their DNS, so you can just ask them to add your server machine
03:57record to their DNS zone, just be sure to request both an A record and a PTR
04:02record for your OS X Server.
04:04If you have your server sitting on the Internet with its own public IP address,
04:07you could get away with just setting up your zones on the DNS system where you
04:11purchase the domain.
04:13How you do that will vary depending on your choice of vendors.
04:15Some do it with a phone call; others will provide a web management tool.
04:19But either way, you'll have to manage DNS on that public system.
04:23At a minimum, you'll have to do this for a machine record and an MX record for
04:27Internet routing of e-mail.
04:28The MX record that we just set up, tells the world, "hey!
04:31When you send mail to groundswellgear.com, transfer the message to
04:34server.groundswellgear.com, so that computer can handle the routing and
04:38delivery of the message."
04:40So, what we need to do now-- underneath groundswellgear.com is we'll flip this
04:44triangle down-- we'll just select that name and click Add Record.
04:47We're going to add a machine record.
04:49As soon as we do, this pops up right below our primary domain name and we have
04:54the opportunity to put in a machine name.
04:56I'm just going to put in the name server, and then I'm going to put in its IP address.
05:01If I want, I can put in software information, hardware information or comments,
05:06and all of these things will be returned when someone requests information
05:10through either nslookup or through the Network Utility.
05:12We'll show you how that looks later on.
05:14For right now, I'm just going to put this is on a Mac Pro, but the software is
05:18running 10.6.x. That way it'll be correct for as long and as many versions as I upgrade through.
05:25Under Comments, I'm just going to put that this server was set up by Sean Colins.
05:31I'll click Save.
05:33Now, because it wasn't fully qualified, what we end up with here is server maps
05:37to 192.168.12.2, and that's useful for a couple of different reasons.
05:41First of all, if somebody looks up the name server in the zone
05:44groundswellgear.com, the completion of that is assumed.
05:49If we wanted, we could have typed the entire fully qualified domain name in
05:52the box down here under Machine Name and clicked Fully Qualified and that
05:56would have been fine.
05:57But by putting in server, we limit the amount of data we have to put in.
06:00If we're putting a lot of records in, this is a perfectly acceptable way to
06:04enter your machine record.
06:06Now, I want more than one name to resolve to server.groundswellgear.com,
06:10so I'm going to add what are called CNAME records.
06:13CNAME records are just basically aliases.
06:15They are very, very easy ways for people to enter a name that makes sense to
06:19them or that they've been given that will redirect to this machine.
06:22So, for example, a very common one is www, and if we say www is always going to
06:27go to server.groundswellgear.com, give it the fully qualified name, and click Save,
06:33what we end up with is www will always redirect to
06:37server.groudswellgear.com, and because we have our A record saying server
06:41points to 192.168.12.2, that www will always go to 12.2. Another name I'd like
06:49to use as a redirect.
06:50I'm going to go add alias.
06:51I'm going to say mail.
06:53Mail is going to also go to server. groundswellgear.com. Click Save.
07:02So now we know that www and mail will both redirect to the same machine address.
07:08So, that's what we've done.
07:11Now importantly, even though this isn't about DNS, this is about SSL, whenever
07:16you're buying an SSL certificate, be sure that you're buying the certificate for
07:20whatever name the end user will use to access the server.
07:24So, if you're buying your SSL cert specifically for mail services on your
07:29server and you're using an alias redirect of mail, you want to make sure that
07:33you buy it with mail.groundswellgear .com as the name of your SSL cert.
07:37This can get a little complicated.
07:39If you set up the SSL cert for server. groundswellgear.com and then you tell
07:43your users to use mail. groundswellgear.com as the DNS name of the server,
07:47the SSL won't match up.
07:49There will be a name mismatch and SSL will still throw up an error message for
07:53those users whenever they try to access that server using that name.
07:56So, just be aware that that's a potential hiccup there.
07:59All right, now that we've got our names and we've got a couple of aliases
08:03pointing to that machine.
08:05Let's get out of here and let's go over to our settings.
08:09Under settings, we have a couple of different things we can configure.
08:12We can configure our log level, which during initial setup is usually a good
08:16idea here at the debug level.
08:17We have the recursive queries area here where we can tell the system who it
08:22should respond to whenever they're requesting information.
08:25So, if somebody on our local networks or the localhost itself makes a request of
08:29the DNS server, those responses will be going out to those networks.
08:34A nifty thing about this area here is that you could add various different
08:38network ranges or specific IP addresses that can be allowed to request
08:42information from our DNS server.
08:44Anything that's not in this box will not receive a response to a request.
08:48But what I wanted to show you down here is the Forwarder IP Address area.
08:53Now this is where you would put in the IP address for your local ISP.
08:57This is best if it's next highest DNS server as you head out towards the Internet.
09:03So, your Internet service provider is a really good number to use here.
09:06For example, a commonly used number for a well-known ISP in our area.
09:12So, these numbers are used by a local ISP in our area.
09:18So, those are going to be really good numbers for us to use, because they are
09:21very close to us, so responses are going to be very quick.
09:24They're very large networks, so they're likely to have a lot of information in
09:28their local cache, which will also speed up our DNS responses.
09:31Anything that they don't have, they'll be able to refer out to the root servers,
09:35 which will then be able to traverse the DNS hierarchy in order to give us our answers.
09:40If you don't put anything into the Forwarder IP Addresses area, you'll still be
09:44able to resolve traffic, because Apple has put a database or a list of bunch of
09:49the root server IP addresses right in to every machine that they ship out.
09:53But those will be much slower responses.
09:55This is useful because it's much, much quicker.
09:58Once that's in, you click Save.
10:00Once you've configured your new DNS zone and your settings, you'll need to
10:04delete the preconfigured zone that the server created for you initially.
10:07To do that, we go back to Zones, come down here to
10:10server.groundswellgear.com, and click Remove.
10:14We also want to delete the PTR zone for that specific IP address.
10:18You see how it in reverse is 192.168.12.2.
10:22The one up here is 192.168.12.
10:26This one was the one that was created automatically at startup.
10:28We want to delete that one.
10:30Once we've reviewed our settings, and we know that this is all good,
10:34we've got our Forward record, we've got our PTR pointing back to that forward,
10:38and we've got our two aliases pointing to that machine record right there.
10:42Click Save and we're done.
10:45Next, we want to configure our client to use the DNS we just set up.
10:49So, what I'm going to do now is I'm going to get out of the screen sharing that
10:53we've been using in order to control the server remotely.
10:59Here we are on our client machine.
11:00We're going to go to our Apple, pulldown to System Preferences, go to Networking.
11:06In networks, I had already configured our DNS server to point to the server
11:10that we've just set up.
11:12If yours wasn't already set up to look there, you would want to do that now.
11:16So, on your client machine, make sure that you're pointed to the IP address of
11:20your Mac OS X Server on which we just set up DNS services.
11:24When adding your DNS information here, remember that you can use the Search
11:27Domain field right here to tell the client machine what your local zone name is.
11:33This will allow your client computer to find resources in the local DNS zone
11:37by only looking up the hostname without having to type in the fully qualified domain name.
11:41I'll show you how that works now.
11:42If we type that in and hit Apply, I'll just pull this down over here so
11:48it's out of the way.
11:49Then we're going to go to the Go menu. Pull down to Utilities.
11:53In Utilities, we're going to open up the Network Utility.
12:00Now here in the Network Utility, we should be able to do a lookup without typing
12:05groundswellgear.com. Just by typing the name server.
12:12There's our lookup, server. groundswellgear.com and an A record,
12:16192.168.12.2. That's the function that the search domain performs for you.
12:22If I remove that, click Apply and try a search on server again, we get
12:27a different response.
12:29You can see that it doesn't have an answer for us, because it doesn't know. So, your choice.
12:33It's completely up to you, but that can save your users an awful lot of time,
12:41and all they have to do is know the actual hostname of the server, without
12:44knowing the fully qualified domain name or without needing to type it.
12:47When you set up DNS for the first time, lots of things can go wrong.
12:53In the next movie, we'll look at how to test our connection and to troubleshoot when things do go wrong.
Collapse this transcript
Troubleshooting DNS files
00:01BIND stands for Berkeley Internet Name Domain. BIND is software.
00:06Clients lookup information in the DNS by calling a resolver library which sends
00:10queries to one or more name servers and interprets the responses.
00:15The BIND9 software distribution contains a name server and a resolver library.
00:21The BIND files that Mac OS X creates for you are not the easiest things to
00:24hunt down, but I've a short list of the ones you should care about and where they're located.
00:28The first file of DNS importance is located at etc/named.conf, and that's
00:35because the service is the name daemon or name-d.
00:39So I'm going to show you this in a couple of different ways.
00:42First, I want to go to folder and to show you that you can get into etc just by
00:46typing /etc right there and hit Go.
00:49That will show you this file right here in the Finder.
00:52So for those of you who are Terminal averse you've got this option here.
00:57There's named.conf right there.
00:58But as this is an advanced title we are going to go down to Utilities.
01:03We are going to open up the Terminal and we are going to get in and take a look at this.
01:07So, just closing some windows, getting things centered here, and here we are.
01:11Now we are on the server obviously, as indicated here. That's the name of the
01:15server and that's who we are logged in as right now.
01:18Just so we can move around freely without any errors I am going to type sudo -s and hit Return.
01:25And I am going to put in the password on the server, and that returns us into a
01:30shell in which we are root.
01:32Now, this is going to allow us to move around with utter flexibility, because we
01:35are basically operating as root now.
01:38So what I want to do is we are going to cd, which is just short for change
01:41directory, into at etc, and that's /etc/ and hit Return.
01:47If I type ls -l and hit Return, I get a list of pretty much what we were looking
01:52at there in the Finder.
01:53Now, let's see here. And let's clear this just to clean up the screen a little bit.
01:56Now let's do that in a slightly different way.
01:59This time what we are going to do is instead of listing the directory named.conf
02:02as in we are going to look inside of it.
02:06But I don't want to do that with a text editor, because a text editor will
02:09allow me to change the contents of named. conf, and we really don't want to do that.
02:13To do this, we are going to type up less named.conf.
02:19This gets us right in here.
02:21This file really just adds include statements that tell BIND to look at what are
02:26called views elsewhere in the file system.
02:28But this file is important for another reason.
02:30You see it's fragile in the context of the complete server.
02:33If you edit named.conf, named will use that new information.
02:38It'll use it if it's written correctly.
02:40But the changes won't show up in Server Admin.
02:42So you'll have no outward indication of the change.
02:45For our purposes here the important part of named.conf is that it points to
02:49publicView.conf.apple.
02:53And I am scrolling down here so that you can see this.
02:55It's right here at the bottom of the file.
02:57This include basically says "I want you to go over here to see the stuff that
03:02Server Admin has been putting in, because it's all listed over there."
03:06So we say, "All right, fine."
03:07I am going to hit the Q key on our keyboard.
03:10That gets us out of less and returns us back here to our Terminal window.
03:16So other useful files that were referenced there included
03:19etc/dns/options.conf.apple.
03:23That is another hands-off file that the system has auto generated for you with
03:27options information about DNS.
03:29etc/dns/loggingOptions.conf.apple lists the logging options enabled for DNS.
03:35Again, you shouldn't edit that.
03:36Just check it when troubleshooting to make sure the log level was written
03:40correctly by Server Admin.
03:41Now, the file we really want to look at is over here.
03:44We are going to go cd /etc/dns/.
03:49That gets us into the directory.
03:50If I type ls all three of those files that I just mentioned are listed here,
03:54loggingOptions, options, and publicView all followed by .conf.apple.
03:59If we just type less publicView, and I can just hit Tab here and that will auto
04:04complete that name, because after publ that's all unique after that.
04:09So I can just hit Tab, it'll auto complete and I'll hit Return.
04:12And it warns you in big capital letters right here, please do not manually modify this file.
04:16Please make your changes in the named.conf file.
04:20But we know that we don't want to make our changes there either.
04:22We want to make our changes in Server Admin.
04:24At any rate this is a really good place to go to see if all of the stuff that
04:29was supposed to be entered in here was entered in.
04:31And this is where we get to see our zone information, where it says type master,
04:35and that the file is at db.groundswellgear.com.
04:40The transfer and update information there as well.
04:42Then here is the zone information for our reverse.
04:46So, that all looks good too.
04:48So we are going hit Q to get out of that.
04:50Again, Q gets us out of less.
04:52The include statements told us that we needed to look for our zone information
04:55in the /var/named/zones.
04:58So that's where we are going to go.
04:59We're going to go cd /var/named/zones and so you can see I am sort of taking
05:10you on the path here.
05:11There is a long and circuitous route that takes us from the source,
05:15that named.conf file all the way through to this directory here.
05:18Now that we've changed directories into var/named/zones, if I type ls I can see
05:23those two files that it referenced right here, db.groundswellgear.com.zone.apple
05:28and db.12.168.192.in-addr. arpa.zone.apple as well.
05:35Those are the forward and the reverse zone files.
05:38Even though this has a .apple extension, don't let that throw you.
05:40Apple didn't provide these files.
05:42The zone files in var/named/zones are the place where your zones and the
05:46records they contain are located.
05:48So if, once again, we type less and we type db.groundswellgear.com, blah, blah,
05:54blah, we just hit Tab to go through that and I hit Return,
05:57what I am going to see here is our zone information, which is really great,
06:02because now we can check to see if what was entered is correct.
06:08So here we can see that we've got our groundswellgear.com IN SOA
06:12server.groundswellgear.com.
06:14There is the e-mail address that I was telling you about.
06:17So if that was entered in correctly then that's how that appears.
06:20By the way, don't be thrown by that not being an @ symbol.
06:22That's the way it's supposed to be.
06:24Groundswellgear.com is in a name server at server.groundswellgear.com.
06:28Server is in an A record at 192.168.12.2.
06:33Server is in an HINFO record, and that says Mac Pro and 10.6.x.
06:37Remember when we typed that in.
06:39And we've also got our TXT information, which says the server was set up by Sean Colins.
06:44So all of that information that we entered into Server Admin is here, including
06:48down here you see our aliases or our CNAME records.
06:51We have the mail CNAME right there and we have the www CNAME right there.
06:56That's how those should look.
06:58We also have our MX record down below.
07:00Groundswellgear.com has an MX record of a priority 10 that tells it, hey, send
07:04mail if it's received for this domain over to server.groundswellgear.com.
07:09So this is a properly formatted, properly formulated zone file with the
07:14appropriate records within.
07:15That's what this looks like.
07:17If everything looks fine then you know that the problem is not here.
07:21And you can start looking elsewhere, assuming you're having problems and that's
07:24why you're troubleshooting DNS.
07:25So I am going to press the Q key again here.
07:28The Q button gets us out of that.
07:30We've used less several times.
07:32We've used the cd command. We've used ls.
07:35So those are some of the tools we've used to navigate our way around and to view files so far.
07:41Next, I'd just like to take you into the logs directory.
07:45When troubleshooting DNS, it can be helpful to check the logs out.
07:48So one thing we can do is we can use the Terminal right here to just change
07:52directories into Library/Logs.
07:53We can see we've got several logs in here, and right there you can see we've a named.log.
08:02If you'd like me to show that to you over here in the Finder, I can do that as well.
08:05Library/Logs and there we have it right there, named.log.
08:13Same thing listed there, listed there.
08:16So if I just type less named.log, it'll load up the log.
08:23And I can just keep arrowing through this and you'll see everything.
08:26It can feel a little bit difficult to read the logs here though.
08:29So what I am going to do is type Q to get out of that.
08:32I'll type exit and exit again.
08:34The first exit got us out of our root session and the second one got us out of
08:38our Server Admin session.
08:39So now I can quit Terminal and I can go to my Utilities folder,and I can open
08:44up the Console application.
08:46If I do that I can click the Show Log List over here and I can find all of the
08:51logs that are in Library/Logs.
08:53In there I should be able to find my named log.
08:55You can see how this is organized in the same way that it would be found in the
08:59Terminal, if you were just changing directories through those directories or in
09:03the Finder if you're going through that way.
09:05So here we see the named.log.
09:07In here if we had any DNS errors at all we would find them here, and it would
09:12tell us what was going on.
09:13If the service had quit unexpectedly or if it had shut down because of an error
09:18in a configuration somewhere, that would all be listed right here.
09:21I want to quit that now.
09:23Once you've looked that the files DNS uses to determine if the files were
09:27written the way you intended them to be, you should move on to using tools to
09:31test DNS to find out why it isn't working.
Collapse this transcript
Troubleshooting DNS with tools
00:01When we start talking about troubleshooting DNS with tools, we're going to start
00:04here on the client system.
00:05We'll move over to the server and then we'll come back here to the client.
00:08We're going to move around a bit.
00:09So you'll see Apple Remote Desktop in the middle here.
00:12Once you've analyzed your DNS file on your server, you really should move on to
00:15checking hardware and network settings if things still aren't working correctly,
00:19both on the server and the client.
00:21Then to testing or altering aspects of DNS with several helpful tools.
00:24The first step in all of this after you've gone through all these steps looking
00:28at files that we did in the previous movie, is you should look at your hardware
00:31and your networking.
00:32Now this is the "is it plugged in"? question really.
00:36You're going to look at your System Preferences here.
00:38We're going to go to networking.
00:39If your DNS Server isn't entered correctly here on the client, it's not going to work.
00:43Same thing is true on the server by the way.
00:45If it's not the correct number, then DNS resolution won't function because it's
00:49all based on what's in this little space right here.
00:52If we quit those and we go back over to say, for example, the Network Utility.
00:58We can know the Go menu and come to Utilities menu here.
01:01We open up Network Utility right there and come to Lookup and Ping.
01:05These are two fantastic tools that we can use in order to see if our DNS
01:10is working properly.
01:11If we can't get name resolution, say we went into Lookup and we've tried to look
01:15for groundswellgear.com and it didn't work.
01:18We can set that up for ourselves right now.
01:20We can set up a failure situation right here just for you.
01:23Click on Network, come in here, and we'll just put 23 there in the DNS server address.
01:29Now what you will see is when we try to look up groundswellgear.com, it'll just
01:32spin and spin and spin and spin.
01:33And it's not going to find anything.
01:35There just won't be a response because we're not looking at a DNS server
01:39that has an answer.
01:41But if we come over here and we ping the IP address of the server, we know that
01:45the IP address is that 192.168.12.2.
01:50If we ping it based on its number, we are getting a response.
01:54That tells us something.
01:56If the number works but the name doesn't, it means we're not looking to a DNS
01:59server that can resolve that name.
02:02The first place you want to come back and look if that's the case is right here,
02:05because simply by changing this back to the correct numbers so that we
02:09are looking for DNS resolution on our server, we can still do our ping based on the number.
02:15But now if we type in the full name of the server, we ping again, we can get
02:23full resolution off of that as well.
02:25If we come over here and do a lookup on groundswellgear.com right away,
02:29we start getting responses.
02:31If we type in server.groundswellgear.com, we get our A record response just like we should.
02:37By checking your settings here in the Network System Preferences pane and by
02:41testing here using Lookup and Ping in the Network Utility application, you can
02:46get a better idea of what is and what is not working.
02:49Now let's say all of this failed.
02:51I'm going to quit Network Utility here and I'm going to quit the
02:54System Preferences there.
02:56We're going to switch over here to Apple Remote Desktop.
02:58We're going to control the server itself.
03:02We did our lookup on the client in Network Utility and we found the A record,
03:05and we saw that we could ping the server and that was all working, but what if
03:09we tried that on the client and it didn't work?
03:11Well, the next step would be to come over here to the server to make sure that
03:15we can do it actually locally to make sure that the services are functioning the
03:19way that they should.
03:20One sure-fire way to do that is to come in here into the Terminal on the server
03:23itself and type the following.
03:26If we use the dig command and we follow that with the name of the server,
03:33what we should get back is an answer from the DNS server that the server is looking at.
03:39If we want to look at the PTR record, I'll clear this so we get a fresh screen.
03:44We would use the same command dig with a -x flag and instead of using
03:50the name, we just use the IP address that we've just found.
03:54That tells us right here with our Answer Section that we have a valid PTR.
03:59We can see the numbers in reverse, and they've resolved out to the correct name. So we've got that.
04:04That's all checked out.
04:05Another really good tool that you can use here is host.
04:09If you type host and the IP address, you'll see here that it's giving you the
04:15reverse with a domain name pointer to server.groundswellgear.com.
04:20Thanks to the copy and paste functionality and Terminal here in OS X,
04:24you can type host and then paste the name of the server in, and it'll give us
04:28the A record return.
04:29So, there's dig and host.
04:31Those are two fantastic tools you can use at the command line to do pretty much
04:34what you saw us do on the client side there with the Network Utility.
04:38Of course, we also have Network Utility here on our server.
04:41But if we didn't have access to the GUI for some reason, if we had to SSH into
04:44the server or the client for that matter, we can run these tools and get the
04:48results that we need to troubleshoot DNS.
04:51Now sometimes the DNS server on Mac OS X Server might not be running at all,
04:55even the Server Admin might say it is.
04:57So, there are two ways to check if it's really running.
05:00One, of course, is to open Activity Monitor.
05:03So I've just gone to the Utilities folder and I'm opening Activity Monitor.
05:07If I look at All Processes and look for named, I can see right here that named
05:12is running and it has a process ID of 44 and it's functioning. So that's great.
05:17So we know that that's running.
05:18But say we don't have access to Activity Monitor.
05:21What if we needed to do that in the Terminal, because we could only SSH into the
05:24system, for example?
05:26Well, to do that, first we're going to type sudo -s so that we are root.
05:29Now we're going to type ps ax | grep named.
05:39What that will return is the same thing that we saw over there in Activity Monitor.
05:44The only difference is that here it's just expressed slightly differently, but
05:48here you can even see we've got our process IDof 44 and we know that it is functioning.
05:51So that's good.
05:52That means that DNS is actually running.
05:55If we didn't find that then even if we had a little green dot next to the DNS
06:00service in Server Admin, if it wasn't showing up as a running process,
06:04it wouldn't in fact be running.
06:06As we talked about in the files troubleshooting portion of this chapter, you
06:11would look at the log files to see why.
06:13If your Lookups are not working from a client, it can be useful to check to see
06:17if you can perform a lookup locally from the server.
06:20You can be absolutely sure which DNS server you're querying by typing its IP
06:24address or its local loopback address after the dig command.
06:27That would look something like this.
06:29You would type dig, then a space, then an at symbol, and then you'd either type
06:33the local loopback address, which is always going to be 127.0.0.1.
06:37That's on any computer. That basically is the address that says, hey, look at my
06:41local ethernet connection there.
06:43Look back at myself essentially.
06:45Then you would put in a space and the name of your server.
06:48Ours is server.groundswellgear.com.
06:52So what we're saying here is you're telling the dig application to query the DNS
06:58server at that address which is the local loopback address for this information.
07:02We hit Return, and it gives us our answer.
07:05There's our Answer Section right here.
07:07So it has responded correctly to that query.
07:10If our queries were not working anywhere else, but they did work here,
07:14you would know that your DNS service was in fact working, but then perhaps there
07:19was something in-between your client system and the server that was interrupting
07:24the requests from completing, maybe a network service error or maybe cable was
07:27unplugged in some room somewhere.
07:29But this gives you an idea of where your troubleshooting should take you.
07:32This tells you, yes, DNS is working, and it can resolve my query.
07:36Since we're here on the server, if you find you DNS server doesn't respond to
07:40requests properly, it may be that the DNS root cache needs to be updated.
07:47Sometimes these numbers and names of the DNS root servers do change.
07:51It's very infrequent however.
07:53Still, it's good to know that there is a command you can type that will go out
07:58and look at the root servers and get a new list of names and addresses.
08:02That command is once again dig, but with a different option. dig space dot,
08:07it's just the period, another space, ns, space, the greater than symbol, that's
08:12just Shift and the period on your keyboard, space slash var, slash named, slash named.ca.
08:21Hit Return.
08:22It won't give you any response.
08:24It won't tell you that things are going well.
08:26It won't tell you that things are going badly.
08:27But in the background what's happening is it's now updating the contents of the
08:31file named.ca which is location there in var/named.
08:36And it is making sure that names and IP addresses of all the root servers are correct.
08:41And that's really important.
08:43Now if you suspect that your server or client system is responding to your DNS
08:46queries with stale information, you can force the refresh of that DNS cache by
08:51just restarting the service that handles all DNS queries now in OS 10.6.
08:56This is on the server or the client.
08:57So really you could do this on either place.
09:00You restart the mDNSResponder process, responsible for all DNS in X.6 by typing
09:06the following into the Terminal on whatever system you believe to have bad data.
09:10If you haven't already typed sudo, you would type sudo. We have.
09:13So assume that.
09:14Killall -HUP mDNSResponder.
09:33Case sensitivity is important here. Hit Return.
09:37Again, no response, but in the background DNS has just restarted.
09:41In the process of restarting, it's going to clean out that cache and start with a fresh one.
09:46So all this is done, and it still doesn't work.
09:48Well, maybe your problem isn't DNS at all.
09:51Maybe your problem is in routing from the Internet to your server.
09:55If your server like ours here is on a private network behind a net gateway,
09:59make sure that you've forwarded the ports necessary for your services to work properly.
10:04If you're looking for the ports you need to forward, you can either look at
10:08the well-known TCP and UDP ports knowledge base article at apple.com, or you can
10:14just open up ServerAadmin and look at the firewall interface.
Collapse this transcript
2. Firewall
What is a firewall and how does it fit into your server puzzle?
00:00Having nothing to do with dangerous walls of fire a firewall is a device or
00:06software on a computer that watches data traffic and either allows or denies
00:12passage, either in or out based on rules you set.
00:16Firewalls are cleverly named to strike fear into the hearts of people
00:20everywhere and yet they're very handy tools.
00:23Essentially, firewalls are about security, but I prefer to think of them in the
00:28context of a nice nightclub in a tough neighborhood.
00:33The firewall in my analogy is the bouncer standing out in front of the club.
00:38In this case our bouncer is standing in front of many different doors.
00:44He can let you in or not.
00:46He can also keep track of you leaving and let you back in when you return
00:51because he gave you a stamp on your hand to show you've already been inside.
00:56He controls who can get in, but he also controls which doors can be opened or closed.
01:03He can allow only the public in one door, the mailman in another.
01:09He can send the press to a special door, and he can send kitchen deliveries to
01:13an entirely different door.
01:15All doors lead inside, but the different doors are for different purposes.
01:21The bouncer makes sure the right stuff can get into the appropriate doors, and
01:25the wrong stuff can't. He gets his rules from the owner of the club and follows
01:30them no matter what.
01:32Because the club owner has a bouncer, the club is a safer and more orderly place.
01:38A firewall does the same thing, but with data.
01:43The doors in our analogy are ports on the network. Not physical ports, not a
01:47hole you can plug something into, but something defined in software that exists
01:53for the purpose of organizing the flow of data through a network.
01:57In software, services have ports associated with them.
02:02Unsecured web pages are viewed and served over one specific port that everyone
02:07agrees to, just to keep things organized.
02:11Web traffic is on port 80.
02:13So by allowing or denying access to port 80, we can allow or deny access to web pages.
02:21All services that can travel over networks have one or more ports
02:25associated with them.
02:26When a computer that happens to be a web server sees a request come in on port
02:3180, it knows what to do with that request, because of the port it came in on.
02:36Services and ports are directly linked.
02:39So it can be helpful to keep track of frequently used ports.
02:43Apple has a knowledge base article that is updated whenever they create a new
02:47service or use something new. Check it out.
02:51It can really help when you need to set up your firewall.
02:54There are two protocols commonly used on networks.
02:57One is TCP and the other is UDP.
03:01While the standards are tightly defined and complicated, we can simplify them
03:05down to one really important distinction.
03:09Data transmitted over TCP is very careful about whether all of the data arrives
03:15at its destination and UDP isn't. TCP is slower than UDP, because it spends a lot
03:21of time checking with the recipient to verify receipt of all of the data.
03:26If data is lost in transit, TCP transmission will automatically be
03:30retransmitted until a perfect transmission is verified by the recipient.
03:36TCP is very reliable and is used when the data being sent must arrive at its
03:41destination perfectly.
03:43This is typically used for documents or images, things that must be stored and
03:47reused at the destination.
03:50UDP on the other hand doesn't really care if the recipient gets the package in its entirety.
03:56UDP cares more about how much data it can shove out the door as quickly as possible.
04:03A great use for UDP, for example, is video streaming.
04:07If there's a glitch in the video stream, a viewer would probably rather see a
04:12dropped video frame or pixelated images than have to sit and wait for every
04:16perfect frame to come in.
04:18This has to do with how video is perceived, and the fact that a stream of video
04:23is being consumed in real time and not saved for future use.
04:27It evaporates immediately upon playback.
04:29So if it isn't perfect, don't worry about it.
04:32Just keep shoving the data out the door. Because different services use
04:36either TCP or UDP or both,
04:39we have to specify the intended protocol in our firewall settings.
04:44So we almost have all of our firewall bits and pieces figured out, but there is
04:49one more important thing to understand.
04:52A firewall can apply different rules to traffic depending upon where it's coming
04:57from and where it's going.
04:59So you can set your firewall to allow absolutely anything at all into and out of
05:04your server as long as it's coming from your internal network, but not allow
05:09anything at all if it's coming from anywhere else.
05:13This is done by setting up address groups and then using those groups to
05:17organize different sets of rules.
05:20Once you have your firewall configured and ready to go, you turn it on and bingo.
05:26The bouncer is at the door standing there, arms crossed and looking mean.
05:30Now, now that you know what a firewall is, you're probably already thinking of
05:35ways you could use one.
05:37Let's get into Server Admin and see how to set this up on Mac OS X Server.
Collapse this transcript
Firewall prerequisites
00:01For this chapter, please remember that you will have to have Snow Leopard Server
00:05preinstalled, a basic Snow Leopard Server already set up, and you will have to
00:10have a monitor, keyboard, and mouse already connected to your server.
00:15A basic Snow Leopard client would also help you out a lot to complete this chapter.
Collapse this transcript
Deploying the firewall
00:01To configure the server-side firewall, we begin by enabling the firewall service
00:04so we can configure it, and we do that in the Server Admin application.
00:09We open Server Admin, click on the server name, go to Settings > Services,
00:15click the check box next to the Firewall, click Save, and it pops up here in the sidebar.
00:20When we select Firewall, the first place it's going to take us is to
00:24Settings and Address Groups.
00:26So, we're going to start our configuration by deleting any address groups that
00:30we will not use, and then we'll add back in any groups that we will use.
00:34We will not be using the 192.168-net or the 10-net.
00:3810-net, because we don't have that anywhere near us, and 192.168 because it's
00:43just a little too open.
00:46So we're going to get rid of both of these.
00:48We do so by clicking the minus sign, same thing there, and then we click the
00:54Plus button in order to get a new group.
00:56Now, we just name the group based on whatever we think might make sense.
01:01Following Apple's model, I've just chosen to say 192.168.12-net, but then I need
01:07to actually change the addresses in the group to match what I said.
01:10By the way, if you want to create a firewall rule that will only affect one
01:14machine, you can specify one specific IP address that will have specific rules.
01:19But we're not going to do that.
01:20We're going to click the Plus button here and we will put in exactly the CIDR
01:25notation for the group we want.
01:27Now, you'll need to know basic CIDR notation, and by the way that's spelled
01:30CIDR, to do this, but that's not so bad, because you really only need to
01:35remember the numbers 16, which gives you about 65,000 addresses, 22, which gives
01:40you about a thousand addresses, 24, which gives you about 254 addresses, and 31,
01:46which gives you one usable address.
01:48There are others in there, and we'll actually use a couple of different ones.
01:50But you'll have most of what you need with those numbers.
01:53So, you can see that's not that much to remember.
01:56With the additional ones that I'm going to throw in here, you'll probably end
01:58up with six or seven that you'll want to memorize, because they are very useful to know.
02:03Because of the math involved in addressing, you'll also have to be aware of
02:06where the network ranges are allowed to begin and end.
02:09A great tool to help with that is a CIDR calculator.
02:12Many are available on the Internet.
02:14Some are web apps, others are widgets.
02:15I even have an iPhone app that does it.
02:17Whatever tool you like, there are lots out there.
02:20The CIDR notation relates directly to the way you have configured your network.
02:25For example, we're going to set up an address group just for our internal
02:29DHCP address pool right now, and we know that that will be set up for DHCP
02:33later on in this class.
02:34So we sort of have that planned out.
02:36The pool is going to be from 192.168.12.64 to 192.168.12.127.
02:46That's only 62 addresses, I know, but you can make yours whatever you want.
02:49For us, that's going to be enough.
02:51We do that like this.
02:55So as you can see, once you've got your CIDR notation in there, the address
02:59range is calculated for you below and you can double-check your work to make
03:02sure that it is, in fact, going to be the numbers that you've specified.
03:06Due to the math involved again with CIDR notation, your address ranges have to
03:09end and begin at certain numbers, so it doesn't always work out exactly the way
03:12that you would want to.
03:13But this is a great way to configure groups and have your firewall specifically
03:18control those groups.
03:20So, this is going to hit 64 through 127.
03:23What I could do here is I could add a . 64 right there, and I could just make it
03:30the exact CIDR notation, so I see that in my list.
03:36Once you have it, click OK, double -check your work, all looks good.
03:40Let's make another one.
03:42Click the Plus button.
03:44This one is going to be for our VPN range and in this one I'll just use a
03:48different option here.
03:49I'm just going to say VPN Range 192.168.12.
03:51What I'm pointing out here is that it doesn't have to be in that format that we
03:59were showing before.
04:00It can really be just about anything as long as it fits into this box.
04:03What's really important as far as your mathematical configurations go is down
04:07here in the Addresses in group section.
04:09Click the Plus button, 192.168.12, and this one we want to be a little bit
04:14higher in our range.
04:15Now, I know I'm going to be using a VPN later in this title, so the ranges for
04:19the clients I want to be different from my DHCP range.
04:22So my VPN range is going to be 192.168.12. 128, and that's going to go out through 159.
04:30So, that one is going to be a /27 notation, right?
04:35128 to 159, and again, it doesn't give us that many addresses.
04:39That's 30 IPv4 addresses and that, by the way, corresponds to a subnet mask that
04:45could be written that would say basically the same thing of 255.255.255.224.
04:52So, if you're more used to doing subnet masks, understand that CIDR notation has
04:56a direct correlation there.
04:57It's just a different way of writing the same thing.
05:00Click OK and so now we've got our DHCP range which we've written in this way,
05:04and we've got our VPN range which we've written in this way.
05:07If you want to include the names of the groups in your groups, you can do that.
05:11I just use the two different ones so we have an example of each. Click Save.
05:15We've got our IP address groups.
05:16Now we go over to Services and when Editing services for, now we see our custom
05:21edited groups here in this list.
05:24Now, here in the Services section, we want to enable only the protocols and
05:29services that we really need for the groups where they're necessary.
05:33The default behavior for the "any" group, which is basically anyone that's not
05:37included in the two other groups we specified, is to let all traffic out but
05:42only the necessary ports for Server Admin, etcetera, to come in.
05:46Anything else you want to let in you have to turn on yourself in this any
05:51address group, and then be as restrictive or as open as you deem appropriate,
05:55given your organization and your data and the security level you need with the other groups.
05:59I recommend a cautious approach here.
06:02In any new group, always turn on the ports that are in Apple's any group, by default.
06:06So, for example, you see here, we've got these top four TCP (outgoing), TCP
06:10(established), UDP Fragments, and UDP outbound and responses, and then IGMP.
06:15If we scroll down, we've got a few others.
06:18We've got SSH, we've got Mail:
06:19SMTP, and Server Admin and Server Preferences.
06:23You really want to be certain that you go through this list, DNS Directory
06:26Access, and make sure that all of these services are not only enabled in the any
06:32group, but also in your other groups, because when you create a new group, those
06:36services are not turned on by default.
06:39Now, I'm going to configure these while we let time pass here, because
06:44this takes some time.
06:45I'm going to go through and check these check boxes.
06:48For you, it will just be a flip of a second, but in real time here, we're going
06:51to take some time and turn on all the appropriate services.
06:54All right, so I have now gone through and basically duplicated the allowed
06:59traffic in each of these areas.
07:01In the any group, these things were turned on and I've turned them on here in
07:06our second group, and our third group which is going to be for VPN users.
07:10What this ensures me of is that anything that is required to do incoming
07:14traffic will be allowed, and anything that's required for server administration
07:18will also be allowed.
07:20Now, once I've got this thing up and running and everything works properly, I
07:23can go back into my VPN Range, for example, and I can turn off Server Admin
07:28access, or I can turn off SSH access from that range.
07:31Same thing from the DHCP Range that we've set up here.
07:35But I like to start things off with the same access that was available in our
07:39original any group, because that's going to ensure that we don't lose our
07:44server administration capabilities once we turn this thing on, which is really important.
07:48Once you have your ports configured for access the way you want them here in
07:51Services, you can turn on Stealth Mode over here in Advanced.
07:56So, your server won't respond to pings, and if you wish, you can change the
08:00low-priority routing rules in the Advanced tab.
08:03Just remember, usually there's no reason to change these default behaviors,
08:07but if you're an old hand at firewall administration and you have a good
08:09reason to do so, you can change the priority of these rules or enable and disable them here.
08:14Just remember, the firewall rules are numbered and prioritized with the largest
08:17numbers having the lowest priority here.
08:20Tread lightly here, and when you're done, save your work and start the firewall.
08:24Now, once that's done, it's important to understand that you aren't seeing
08:28everything that could be considered a firewall here in Server Admin.
08:31The adaptive firewall is a monitor called Emond that watches traffic coming into
08:37the server and then can create and disable firewall rules, like these, on the
08:42fly, completely automatically.
08:45It does this when certain preset conditions are met.
08:48So by default, the behavior that is turned on that most of you will find
08:51interesting is the failed login attempt monitor, which will block login attempts
08:56from a given IP address after 10 failed login attempts from that IP address.
09:01After a 15-minute wait, login attempts can made from that IP address again.
09:04So, this basically just provides you with some protection from automated
09:10attempts to guess users' passwords.
09:12Now that we've looked at the server-side of firewalling, I'm going to quit Server Admin.
09:16We'll switch back over to our client system.
09:19Here on our client system, I wanted to show you some stuff about firewalling on the client.
09:23Even though this course isn't really about the Mac OS X client, I wanted to
09:27show you how you can turn on and configure the client-side firewall to work on
09:30your client machine.
09:32While IPFW, the firewall we just configured on Mac OS X Server, is actually
09:36present in the kernel on Mac OS X client as well, the application firewall
09:40is not IPFW, and you get to that from System Preferences, in Security, under the Firewall tab.
09:47You'll have to authenticate in order to get in here.
09:50To get to the Advanced button over here, you're going to have to click the
09:53Start button and then once you click Advanced, your system will already have
09:58Automatically allow signed software to receive incoming connections checked and enabled.
10:04Depending upon what services you've already got running on your client, you
10:07may, whenever you click that Advanced button, receive a bunch of allow or deny access queries.
10:13Just respond with those according to what you think is appropriate.
10:17Once you're in here, I'd like to point out a couple of things.
10:20This box here is where you can allow or deny access to the network for
10:25specific applications.
10:28You can see because we already have some services turned on, they've been
10:31Allowed incoming connections by default completely automatically.
10:35If we click the Plus button, we can find others that are sitting here,
10:39like this, for example. Click Add.
10:41And that will now be allowed incoming connections.
10:43Of course, we can also select here and block those incoming connections for that
10:47application if we wish to do so.
10:49Now, this would be only necessary if this application were not a signed
10:54application that was signed digitally by the application developer.
10:59As long as this check box here is checked, there is a certain amount of
11:02automation to the allowing or the denying of access for applications to the network.
11:09As you can see down here, we have the ability to enable stealth mode, just like
11:13we did on the server.
11:14This again, will allow this system to not respond to ping traffic whenever it receives it.
11:20If you're in a place with a network that you don't necessarily trust,
11:29 [00:11:30.401 coffee shop, trade show, someplace where you don't necessarily know everybody that's going to be there, you can always just raise all shields.]
11:29You can just bring your Block all incoming connections on, and that will just
11:34supersede everything that you've got configured here and block everything except
11:38for outgoing traffic.
11:40Remember that even with shields raised to full, you can still make outgoing
11:41requests for things like web pages and those web pages will come back to you.
11:42It's just that services you might turn on like iChat won't be able to
11:44automatically signify to others on the network that you have come online.
11:45Essentially, requests that are allowed to come in to you must result from a
11:46request you made through the firewall.
11:47All other attempts to connect to your computer will fail.
11:48To enable that, you just click the OK button and firewall is already on,
11:49so you're all set up.
11:50Now, to turn that off whenever you get back from that trade show or coffee
11:53shop, all you need to do is come back in here, uncheck Block all incoming
11:56connections, and click OK.
12:00If you wanted to, you could even click Stop and just turn off the firewall
12:03entirely right here.
12:04Of course, if you have any problems with the firewall on your server or your client,
12:08you're going to need to troubleshoot that firewall, which is what
12:11we're going to do next.
Collapse this transcript
Troubleshooting server-side firewall issues
00:00The way we configured the firewall in the last movie left your client in the
00:04awkward position of being unable to access the server remotely.
00:08That's okay because right now you're experiencing what happens if you set up a
00:12firewall rule and it blocks your access.
00:15It really isn't possible to get past it, is it?
00:17It's rather annoying.
00:19Well, this is why we advised you to have a monitor, keyboard and mouse
00:22attached to the server, because this is where you're going to actually really, really need it.
00:27On the server, we want you to open up Server Admin.
00:30When you open up Server Admin, you're going to go to the Server, go to Firewall,
00:35and under Settings, in Address Groups, what we're going to do is we're going to
00:40create a new rule that has the IP address of our client machine.
00:46We're going to allow it full access. Okay?
00:50So we're going to click the Plus button, we're going to give it a name that
00:54makes sense to us, and we're going to put in exactly its IP address, and we're using 12.20.
01:03If you're using a different IP address, feel free to put it in here now, and click OK.
01:08So now, we've got our Server Admin client, we click Save, and we can now come
01:13over here to the Server Admin client, which by default is going to only Allow
01:18traffic to these ports, which is nothing, and we're going to allow all traffic
01:22to the Server Admin client.
01:23When we click Save, now you'll be able to access your server from your client system.
01:29So, there we are.
01:30We have basically gone through the troubleshooting process here of realizing
01:33that we have disabled our access to the server using the firewall and we've
01:38gone in directly using the keyboard and mouse and monitor to turn on that access.
01:43So, now that that's done and we have the firewall rules configured the way we want,
01:47you have changed your rules either incrementally or dramatically to get
01:52them exactly the way that you want them, and you're going to want to use IPFW to
01:58list all those rules that are configured on the firewall.
02:01Now, you could obviously look at that list here and kind of combine the
02:07combination of all the rules that you've got available here to you, but this
02:10isn't as slick and convenient as doing it in the Terminal.
02:14So, that's what we're going to do.
02:15I'm going to quit Server Admin.
02:16We're going to go to the Utilities folder and open up Terminal.
02:19When we get in there, we're just going to type sudo -s, so that the rest of our
02:25section here will be done as root, then we're going to type ipfw list.
02:30What results here is a list of all of the rules that we have configured in our firewall.
02:36So, all I'm going to do is I'm going to select all of this and I'm going to
02:40Command+C to copy it. Come back over here into the Finder.
02:43I'm going to go into TextEdit, change this to Plain Text, and I'm going to paste
02:49the contents into this TextEdit document, and then I'm going to save this
02:53document right here to my Desktop as Firewall Rules.
02:59This is going to be very useful in a little bit, but for right now, let's stay
03:03right here in Terminal, and we'll talk about what this here is doing.
03:07The first column of numbers you're seeing there are the firewall rule numbers,
03:12which is an important thing to have because in the future there's going to be
03:16some stuff we need to do that can only identify these rules by that number.
03:20So, that's why we have that text document copied off to the side there.
03:24We also have the traffic type and the service port number, which will be how you
03:28identify which service is enabled.
03:30The ipfw list doesn't help you out the way Server Admin does and that it won't
03:35list the server associated with a given port.
03:37You have to either know the port and what service it's associated with or have
03:41a reference nearby to consult, so you know what's what.
03:44A very good reference is available at Apple's web site in the well-known TCP
03:48ports KB article, which is available at support.apple.com.
03:51It can be useful to copy and paste this list of rules into a text document or
03:55somewhere else for later access. I put it in a text document, but keep in mind
03:59you could put this list on a password-protected blog page or Wiki page
04:03in your IT department.
04:04There are several places where you could put it obviously, but you just want to
04:07make sure that your rules are documented here.
04:09If you want to turn off the firewall, but can't access Server Admin for some
04:13reason, you could just use the sysctl command in the Terminal.
04:17So, let's go ahead and do that now.
04:19I'm going to type clear in order to clear out the space and I'm going to type
04:22sysctl -w net.inet.ip.fw.enable.
04:32If it works successfully, you'll get this as a response.
04:34We can turn it back on again simply by replacing that 0 with the number 1,
04:40and hit Return.
04:41That turns it back on.
04:43Now, if the firewall is running on your server and you're sure the rules are
04:47configured correctly, but you still can't log in, for example, from a remote
04:51system, there is another possibility.
04:53It's possible that the Adaptive Firewall has kicked in, because someone's tried
04:57to log in too many times from your IP address and failed every time.
05:01In that case, just wait for more than 15 minutes and try again.
05:04The Adaptive Firewall will have expired its temporary rule by then and
05:08it should let you in.
05:09Of course, if you can't wait, you could always try logging in from a
05:12different IP address too.
05:14If your firewall on the server is still misbehaving, you can find out why fairly
05:18easily, by opening up the log file for ipfw in Console and watching the traffic.
05:24We can do that easily from right here by typing open /var/log/.
05:29That's the path to it and then just typing the name, ipfw.log.
05:35By doing that, it tells the Console application to open that log file and as
05:38you can see, right here we've got the log file.
05:42While watching that log, you can keep an eye open for the rule numbers that are being logged.
05:46They might just be the most useful thing to look for it.
05:48First, because you can focus your search down on a specific rule, which of
05:52course means a specific service that you're concerned about.
05:55If you find a lot of denies for something, it might be worth looking into
05:59a little more deeply.
06:01If you have a rule that's blocking traffic erroneously in IPFW, you can delete
06:05just that rule rather than shut down the whole firewall.
06:08Ss long as you have the rule number documented somewhere, and let's get back to
06:12our text document right here.
06:15If you have your documented rules still available from before, you can just find
06:18a rule in that list that you want to delete.
06:21When you find the number you want to remove, just use that number to delete the rule.
06:24So let's find something that we can delete without hurting any of our services
06:27that we're using right now.
06:29We know that port 25 is used for SMTP, and we're not doing any mail at this
06:32time so we can kill this one pretty easily.
06:35So, this rule number is 12307, so all I need to do is go back into Terminal.
06:42I'm going to flip over to Terminal right here and we type ipfw del and then
06:50that rule number, which is 12307.
06:53Type that, hit Return, and that firewall rule is now no longer there.
06:58It's no longer a part of the rules that we've put in place.
07:01If we wanted to be really thorough about it and kill everything going to port
07:0425, we could kill, look at that, 307 is killing the UDP as well. So there we are.
07:09We've got TCP and UDP both gone.
07:12This is what we've saved.
07:14So, we can check to make sure that the rule was removed by going into Terminal again.
07:17We can just up arrow to get back to where we did our original ipfw list.
07:23Hit Return and our rule should be deleted now.
07:2712307 and 12307 is now gone.
07:33Now, keep in mind, port 25 traffic from other rules were not deleted here,
07:37because we only deleted the rule number we specified and not all rules that
07:40reference that port. So there we are.
07:42That's how you delete a specific rule from your IPFW configuration.
07:48Now, in the DNS Servers, I've found that it's useful to know the location.
07:52I'll just clear this out, so we got some more space to us, and I'll clean this
07:56up, so we can see what we're doing a little bit better.
07:58Get out of Console.
08:00In DNS, it's sometimes useful to know where the locations of those
08:03configurations files are, because you want to double-check that they
08:06were written correctly.
08:07With the firewall, that's not so necessary, but it's still useful to know where
08:11those configuration files are located.
08:13So we're just going to pop into Terminal and locate them now.
08:16Here in Terminal, we're just going to cdover to /etc/ipfilter/ and run list.
08:23While I'm here, I want you to make note of, but please don't edit anything in
08:28this directory, especially if it has a .APPLE extension.
08:32If you edit .APPLE extended files, your firewall could become unresponsive, or
08:36you could lose the ability to control it with Server Admin.
08:39But if you want to hand-edit a file in this directory, a good candidate would be
08:43the ipfw.conf file which could be used to add rules.
08:48If we type less and open ipfw.conf, you can see here we have a lot of commented
08:57stuff out here, but anything that you add into this file that's not commented
09:01will be respected by the IPFW system.
09:05Just be very careful here whenever you're making edits to this file, because
09:09if you mistype something and save it, IPFW is going to try to load and run with that.
09:15As we've already experienced, a misconfigured yet active firewall is a cruel
09:19and unforgiving thing.
09:20In our next movie, we're going to look at how to troubleshoot firewalls from
09:23the client side.
Collapse this transcript
Troubleshooting client-side firewall issues
00:01Since I showed you how to configure the application firewall and turn it on,
00:04I think it's only fair that I show you where its log file is and how to read it.
00:08So, to do that, we're going to go into Terminal once again and we're just going
00:12to type open /var/log/alf.log.
00:19When that opens, it'll open up in console and we'll see here that we have our
00:24application firewall log.
00:27One of the last things that it mentions is that it's creating
00:29the appfirewall.log.
00:31So, we're going to go down here and look at the rest of what it lists.
00:35So, when you read that log, it's simply going to tell you about allowed or
00:38denied traffic associated with an application name and where the traffic came from.
00:43If the log is telling you that it's denying traffic you didn't intend, take a
00:47look at that application firewall configuration again to make sure it's what you wanted.
00:51If your system is blocked from administering the server still at this point,
00:56you're going to want to go back to your server using the local connection that
01:00we recommended in the Understanding This Title movie.
01:04Check your computer group to make sure that the address is the same as the
01:08static IP address that you have configured here on your client system.
01:13You want to be sure that you have full access at this point.
01:17Go ahead and do that now, as you're going to need your server to be fully
01:20accessible from at least the client computer from this point forward in the title.
01:26In some organizations, there are entire groups of people dedicated to
01:30configuring and monitoring the organization's firewall.
01:33If you're in a small organization or maybe it's just you,
01:36it's still worthwhile to open up the logs especially on your server and in
01:41Console, filter on the word Deny, and scan through it quickly for large
01:46chunks of deny activity.
01:48You can do that easily by going into your server, just as we are here on the
01:51client, and just typing the word deny here and what will result will be
01:55anything that was denied traffic.
01:57If someone is trying to break into your server, it's better to find out about it
02:01before they succeed, than to react to the break-in once it's already happened.
Collapse this transcript
3. DHCP
What is DHCP and how does it fit into your server puzzle?
00:00DHCP stands for Dynamic Host Configuration Protocol.
00:06Sounds intimidating, doesn't it? It's not that bad.
00:09Actually, you use DHCP everyday.
00:12So, you probably should know what it is and how it works.
00:15A DHCP server, when enabled on a computer network, will assign IP addresses
00:21and network configuration information to computers when they come onto the
00:25network and request it.
00:27If you think of a computer network as a cruise ship, a DHCP server sits there
00:33like the cruise director with a clipboard, handing out temporary name tags to
00:37guests as they arrive.
00:39The cruise director greets them, provides them with a number, and some rules
00:43about what rooms they can get in to and what they can't. The kids, for example,
00:48get a special wristband that lets them into the kids' area, and adults get
00:52another wristband that let them into other areas.
00:55Maybe the ship's staff come in and get exactly the same name tag every time,
01:00because the cruise director needs them to be consistently identifiable by the guests.
01:05Now, if we flip this analogy over to a computer network, that works in a similar way.
01:10The DHCP server can hand out all the information the guest devices need to
01:15function on the network.
01:17The server can give them different information, depending upon what
01:21network they've connected to, or it can even give a client system the
01:25exact same address, every time it connects, based on some predefined
01:29identification information.
01:30The benefit of this is that a network administrator doesn't have to keep track
01:35of a bunch of static IP addresses.
01:38Instead, the DHCP server can just hand out necessary information as it's needed.
01:45This also makes it really easy to change network information, as you only have
01:50to change the information on the DHCP server and perhaps a few manually
01:55addressed devices if you need to change your network design.
01:58So, super cool, right? All right!
02:01So, let's get a few terms out of the way, and then we'll get to configuring it.
02:05If you need to set up DHCP, you can do so with many different devices.
02:09For example, using an AirPort Base Station, any commercial residential router, or using a server.
02:17We're going to look at how to do this using Mac OS X Server.
02:21But many of the principles will still apply regardless of which device you
02:25use to set up DHCP.
02:27DHCP hands out a bunch of network information.
02:31But the most important thing that most people think about is the IP address.
02:37We defined what an IP address is in the DNS chapter.
02:41But basically, it's a number that provides an address other computers can use to
02:47find your computer on a network.
02:50The word Dynamic in DHCP indicates that the IP will be dynamic or changing.
02:57Now, I understand, change is scary, but that's okay, because any machine
03:01getting a dynamic address probably doesn't need to be at the same address all the time anyway.
03:08By the way, that's why you generally want to put printers and servers on static
03:14IP addresses, whether configured with DHCP, or manually.
03:18You don't want them moving around on you.
03:20DHCP also hands out subnet information, which is important, because the subnet
03:26tells your computer how many other devices might be in the area.
03:31It, in conjunction with your IP address, defines where your computer is on the
03:36network, and how many other addresses your computer should look for to find
03:41stuff that's close to you.
03:43You can set up DHCP on many different devices, in many different ways.
03:47Though many of the principles of what we're about to do will apply to any DHCP server.
03:53What we're going to do now is look at how to do this using Mac OS X Server.
Collapse this transcript
DHCP prerequisites
00:00Here in the DHCP chapter, we're going to still need to have the Snow
00:04Leopard Server installed.
00:05We'll have to have the basic Snow Leopard Server set up already, but most
00:09importantly, please make sure you're disconnected from any other network, other
00:14than the one we are working on, in this class. I'm not kidding.
00:17This is really, really important.
00:19Because if you turn on your DHCP server during this chapter on an existing
00:23network, you're going to mess stuff up for other people and we want to play
00:27nice with others, right? Okay!
00:29Also, it could be helpful for you to have a Snow Leopard client set up already
00:32as well, just so you can test out your DHCP once you do get it running.
Collapse this transcript
Deploying DHCP
00:00If you've been following along in this class from the beginning, you know by now
00:03that we went out and purchased a very inexpensive router to host our network.
00:08We left NAT on, but turned DHCP off.
00:11Now admittedly, this is a rare configuration option, because DHCP is on by
00:15default in just about every router for sale today.
00:18I say just about because nothing is 100%, but it's probably all of them.
00:22Anyway, if you have been doing this title up until now with DHCP on in your
00:27router, go ahead and turn it off now. Don't worry.
00:30I'll wait. Oh!
00:33If you have an AirPort Base Station, and you want to use that as your router,
00:36don't. Not for this chapter anyway.
00:38You can't turn on NAT and turn off DHCP at the same time on those devices.
00:43So, for the purpose of this chapter, the Apple AirPort Extreme or Express Base
00:48Stations, though excellent products overall, just won't work here.
00:53Now that we have that out of the way, open Server Admin and go to Services.
00:57We have Server Admin right here in the dock and yes, we are actually getting
01:02onto this from the client, so all of this is happening remotely.
01:06We're going to go to Settings > Services > DHCP and we'll click Save and then
01:14come over and click on DHCP in the sidebar.
01:18Configuring DHCP is pretty easy, but you have to know your IP ranges before
01:22you start the service.
01:23Otherwise, if you get it wrong, you'll just end up coming back in here and
01:26doing it all over again.
01:28In our planning, we decided that we would have a DHCP range from 192.168.12.64
01:35to 192.168.12.127, and that that would be the range that would be handed out to
01:41computers using the DHCP service.
01:44Now, I know that I'm also going to be using a VPN later in this title and I
01:48want different ranges for those clients to be handed out by the VPN server.
01:53My VPN range will be 192. 168.12.12 through 192.168.12.159.
02:01So, I can't interfere with those addresses here in the DHCP settings.
02:04Since our DHCP range is 192.168.12.64 through 192.168.12.127, but our router is at
02:13192.168.12.1, our server is at 192.168. 12.2, and we want our DHCP clients to be
02:21able to see the entire 254 nodes subnet as a local network,
02:26we will not be using the CIDR notation that we used in the firewall to configure this.
02:32We start by going into subnets.
02:35We click on the name of the default subnet and we delete it.
02:39We click Save and we click the Plus button.
02:42This gives us a brand-new one.
02:43Now this subnet name, I'm just going to call Internal DHCP.
02:50The starting IP address, as we said, is going to be 192.168.12.64. Our ending IP
02:58address, 192.168.12.127.
03:03Now, this is where this becomes important.
03:05What I just said about the subnet mask, if we were using the CIDR notation from
03:08our firewall rule, we would be doing this.
03:14And that would be bad, because in this case, if we were to set that up, the only
03:19computers that any of our DHCP clients would be able to see would be computers
03:24between 64 and 127, which means they wouldn't be able to get to our router.
03:27The router is at 192.168.12.1.
03:34That wouldn't work, because these systems wouldn't be able to see the router,
03:37because it's outside of the subnet.
03:39So, we have to make this the 255.255. 255.0 subnet. That would give us full
03:45access to that 254-node range.
03:49We also want to configure the correct Ethernet interface for the network that
03:53will be sending out that DHCP information.
03:55So, we're going to go with en0, and once again that we got this, we'll go 192.168.12.1.
04:02A lease time typically is actually close to 4 hours.
04:06Once we have that in place, we can go over here to DNS.
04:09DNS is currently configured as the local loopback address.
04:12That clearly won't work for our clients though, because they're not hosting DNS servers.
04:16So, what we need to do is put in our DNS server as the DNS server that's
04:22handed out via DHCP.
04:24We can also take this opportunity to put in our network's search domain, which
04:31means that this will be handed out into the network settings, and this will be
04:34handed out into the network settings, and all of the clients will receive an IP
04:38address from 64-127, as they come on the network.
04:43With that, we can click Save.
04:44Now with your DHCP range configured and assigned to the correct network
04:48interface, you can move on to configure the LDAP options that are available here,
04:52and you could also configure your WINS options available here.
04:56But there are two problems with this.
04:58First, as a security best practice, you generally don't want to let your client
05:03machines pick up LDAP information for authentication and contacts via DHCP,
05:08because they will do that on every network then connect with, potentially
05:11opening the client after being compromised by a rogue DHCP server.
05:16A rogue DHCP server is one that is functioning on a network where it shouldn't exist.
05:21A malicious rogue DHCP server could be used to pass out LDAP information to
05:26clients to allow a hacker to log in to those client machines, because LDAP has
05:31the capability of sending that information out, and then the client system would
05:36use that information to look back at a directory of user accounts that are able
05:40to log into it. Because that would be a bad thing, generally,
05:44you probably want to turn off the ability to receive that kind of auto-configured
05:48LDAP information on all of your clients.
05:51If you turn it off on all of your clients, it's off by defau on 10.6, then
05:54there is really no point in configuring it in OS X Server's DHCP settings.
05:59So, I would leave this blank.
06:01If you're on a network where WINS isn't used, you can add those settings to the
06:05WINS tab, and the Windows clients will pick up that autoconfiguration
06:08information as well, which will make it easier for them to find network
06:11services on your network.
06:12We don't have any network services here offered up in the WINS format.
06:17We don't in fact have any Windows clients right now, so that's not going to
06:21be configured either.
06:22We're going to leave both LDAP and WINS blank.
06:24Configure General and DNS, both as we've shown already, and we've already
06:29clicked Save, so all we need to do now is click the Enable check box next to Internal DHCP.
06:35And that once saved will be an enabled DHCP range that will be served out over
06:42the en0 network interface.
06:45Before you start DHCP, it can be useful to go to Settings and turn your
06:48Log Levels up to High.
06:50That way you'll get full logs on everything that's going on with DHCP, which is
06:55being handled by the BOOTP service.
06:57I click save there and I click Start DHCP.
07:03We're now handing out DHCP over that network interface.
07:08All we need to do now is open up a client and have it attached to the network.
07:13We can see if clients have attached to the network by clicking over here on the
07:17Clients interface and as people come on the network, we'll see the computer name,
07:21their Mac address, their client ID, their IP address that we've given
07:25them, and the lease time remaining on their DHCP lease.
07:29So, we've opened up a laptop, and there we go! Excellent!
07:33We just click Refresh a few times and it's popped right up.
07:36So, we see the computer's name, we see its Mac address, we see the IP address
07:40that it's been handed, and how much lease time now remains.
07:44Now the nifty thing about this is that once we've got somebody that's received
07:48an IP address, this gives us an opportunity to create a static map.
07:51All we have to do is click the Create Static Map button and come up here and
07:56click Create Map, flip down the triangle, and here you've got all of the
08:02information that the client just received.
08:04If we want to change any of that information, we click the Edit button,
08:08leave the Computer Name exactly what it is unless you want to mess with the client.
08:13Leave the Mac Address exactly as it is.
08:15But we can change this IP Address.
08:17We can say, I don't want this to receive the 64-address.
08:21I want this one to always receive the 127-address, and we just do that by coming
08:26out here to the end and giving it an IP address that's in the DHCP range.
08:31This is a really handy way of using DHCP, but still providing a device with the
08:36same address all the time.
08:38It's sort of a mixture between this dynamic addressing and static addressing,
08:41making it easy to locate the device over and over again.
08:45This could be a really cool trick to use with printers, where they are
08:48configured to pick up a DHCP address, when new without any local configuration
08:53right out of the box.
08:54Once the device is in the table, just use that information to get into this
08:58interface to set the IP address information you want for that printer and bam! You're done!
09:03Click OK and that device will always get that same address every time. Click Save.
09:08It will ask you if you want to restart DHCP, but that's no big deal, and you're done.
09:15DHCP is a solid technology that's been around for years, but there are still
09:19plenty of things that can go wrong with it.
09:21Let's look at ways to troubleshoot DHCP in the next movie.
Collapse this transcript
Troubleshooting DHCP
00:00When troubleshooting DHCP, there are a few places you can look to see if the
00:04problem is local to the server or in the client or in the network in between.
00:09If you think about it, DHCP functions properly when the client asks if a
00:14DHCP server is present.
00:16The server responds that it is, then the DHCP client requests an address, then
00:21the server provides all the configuration info that it has for the system on the leased basis.
00:26When the client comes to the end of its lease, it renews and usually will get
00:30the same IP address upon renewal of the lease.
00:32And when the client leaves the network, it tells the server that the address
00:35has been leased and that it's being returned to it and is available now for
00:40someone else to use.
00:41The first thing that can get in the way of that is that the server might not
00:45hear the client's query about whether the server is out there or not.
00:49Then that communications process can be interrupted by a network disconnection
00:53like an unplugged cable or a damaged network interface, or by access control
00:57lists on a switch that forbid the client from accessing the service, or by a
01:02firewall rule that prevents the traffic from breaching the server.
01:05I'm going to open Server Admin, here we are on the server, and I'm going to take
01:12us back over to the firewall.
01:15Now we've got our various groups, and I'm going to go into our DHCP range and
01:23what I want to do here is I want to make sure that the ports that are necessary
01:28for DHCP are enabled in all necessary groups.
01:36I am going to sort by Description and this is where Mac OS X Server's Server
01:45Admin interface really shines.
01:47The ports that are necessary are 68 and 67 and all you have to do to find them
01:51is sort out DHCP and you've got them.
01:53Those are the only two ports that are necessary.
01:55I'm going to just be doubly secure here.
01:59That one's allowing all traffic, and I think we've got the any of rules set to
02:02Allow all right now, which is fine for what we're doing.
02:06So the point being that you're for sure that you're allowing 68 and 67 for
02:10absolutely everyone.
02:12You can check your active rules over here, but once you've done that,
02:16your client should be able to receive a DHCP address.
02:21So that's accessing the Firewall and changing the way it is configured to allow
02:25your DHCP to function properly.
02:27And even if it's not your firewall, if it's someone else's, you can go to them
02:30and say hey, turn on Port 67 and 68.
02:33We need that to be available because DHCP has to work, and that's what they can do.
02:38Another easy thing to fix is to find out if the service is actually running.
02:41Let's say you can't get into Server Admin for some reason.
02:46Lo and behold, yes, there is.
02:48There is a Terminal way to do this.
02:50If we open up Terminal here from the server, and we just type sudo -s to make us
02:56root, and we just type serveradmin fullstatus dhcp,
03:03what we get back is a really detailed list of what's going on with DHCP.
03:09We know that it's running.
03:10We know it's backendVersion.
03:12We know how many active clients it's got.
03:14We have a lot of information that can all be very useful for troubleshooting.
03:18So that's a very important thing to remember, and it's good thing to memorize.
03:21It's serveradmin fullstatus dhcp.
03:25BOOTP is the name of the service that runs DHCP on Mac OS X server.
03:29So, when you look at logs for useful troubleshooting information, what we want to
03:33look at is the system log.
03:35So I'm going to go into Utilities, and I'm going to go to Console and open it.
03:40And what we're going to do now is we're going to close this down.
03:43We're going to find the system log.
03:45The system log is right here.
03:46And if we do a filter on BOOTP, what we'll find is all of the traffic that has
03:52been generated by our DHCP server.
03:54And here you can see the offering and the replying and all of the transaction
03:59information that's in place here between our server and our client system.
04:04If there is a problem, if, for example, a request is being received, but a
04:08reply is not being sent, you'll see that here and you can troubleshoot that
04:12from this position.
04:14So this is a great log to look at right here.
04:17Just remember to filter on BOOTP when you come in here and look.
04:21If you haven't done so already, this would be a great time to try to access the
04:25network using a device that can pick up DHCP.
04:29We already did that in our Configuring movie, so we know it's
04:32functioning properly.
04:34But it's a fairly easy thing to do.
04:35You plug any device into the network and if it receives an IP address in the
04:39range that you specified, your DHCP server is working.
04:43We have success then and we can move on to our next subject, which is VPN.
Collapse this transcript
4. VPN
What is a VPN and how does it fit into your server puzzle?
00:00You need to say something very important and very private to someone else.
00:06You're a spy, and your secret could mean life or death for millions.
00:12The security of what you're about to say cannot be compromised.
00:17You're watched, you're bugged, and every word you say is heard instantly by
00:23everyone you must evade.
00:26You need some way to communicate securely and accurately with someone in another
00:32room in another country, thousands of miles away.
00:38You step very carefully into a dark box about the size of an old wooden phone booth.
00:47You close the door behind you, and you're encased in darkness and silence.
00:55The sounds from the room you just left are gone. The light is gone.
01:01Everything is gone.
01:04You say your name and a password, and the box transmits a secret only the box
01:10knows to another box in another room, thousands of miles away.
01:16Suddenly, you're bathed in light and the sounds from that distant room
01:21thousands of miles away.
01:22You're not there, but you see and hear and can interact with others in that
01:29room as if you are there.
01:32You have entered a VPN.
01:36You may not be a secret agent, you may not even be the IT guy who supports
01:40spies, but you probably want to protect yourself from the prying eyes of hackers
01:46or other snoopers who would just love to know what you're doing.
01:50A lot of hackers would be very happy to sniff your username and password off a
01:56public network, so they can access your accounts later.
02:00You'd be surprised how easy it is to eavesdrop on a network.
02:05If you have ever connected to a wireless network in a coffee shop, a hotel, or a
02:11library, your data was exposed to every one else on that network at that time.
02:19If you logged into chat or check your e-mail or make an online purchase, your
02:25personal information was probably exposed on that network.
02:30There are only a few ways to protect yourself from the people who want to
02:33collect your information.
02:36One of those ways is using SSL, and you may remember that we tackled the
02:41subject of SSL in Snow Leopard Server New Features, and in Snow Leopard Server
02:47Essential Training.
02:49But for all of your stuff that isn't or can't be protected using SSL,
02:56there's really only one black box you can step into to protect yourself, and that's a VPN.
03:02Encryption is a cool technology, and it's been around for centuries.
03:07From Julius Caesar to the US military employing Native American code talkers to
03:12speak in their native language to create an unbreakable code in World War II, to
03:17the James Bond's spy novels, encryption has been in our collective culture for
03:22what seems like forever.
03:24Encryption is code.
03:27When you encrypt data, you wrap up something that anyone could read in a
03:33wrapper that changes it.
03:34So it cannot be read until it gets to its destination where a code can be used
03:40to unravel the mystery of the context.
03:43This makes it readable again.
03:45When you activate a VPN, you can send all of your network traffic from your
03:50computer to your VPN server in an encrypted form that can only be unrevealed by the VPN server.
03:58As a result, you can send and receive information to and from your trusted
04:04network without any fear of interception by the bad guys.
04:08To prove you are who you say you are, you have to authenticate, and this process
04:13is simple and should be straightforward for any person who can use a computer.
04:18All the person must do to authenticate is enter their unique username and
04:22the correct password.
04:24In our analogy above, the black box transmitted its own secret to another
04:29black box as the final step in the process, before our hero was transported safely away.
04:36In a real VPN, at least sometimes, a shared secret must be present in addition
04:43to the authentication information to complete a secure transaction.
04:48Sometimes the VPN server is embedded on a piece of network equipment, but OS X
04:53server has VPN server software included and it's really very good.
04:58So let's get into Server Admin and configure our VPN server.
Collapse this transcript
VPN prerequisites
00:00Here in the VPN chapter, again, we will need Snow Leopard Server installed and set up.
00:05We will also want to connect a client machine to the Internet via some other
00:11network, other than what we have got set up, and this is a really different
00:14reason than the stuff we were talking about over in DHCP.
00:19The point of the VPN is that you have to make a remote connection.
00:21Well, if your client is connected to the same network as the VPN server, it sort
00:25of misses the point.
00:26So, get yourself a client, hook it up to something on the outside world if you can.
00:31A Wi-Fi card from a cell provider is a good choice here, or you can go over
00:36to a friend's house and try it from there. That would work too.
00:39One way or the other you are going to need to have that connection outside.
00:42If you want to use the fully qualified domain name of your server from the
00:46Internet in your VPN configuration, you'll have to have that ISP level DNS set
00:51up correctly. Otherwise from the outside,
00:53you are just not going to be able to connect your server.
00:55Now you could always use your external IP address so just remember that is possible too.
01:00Be sure to have Firefox or whatever program is necessary to work with your
01:05router available for you to use, because we do actually go in and make changes
01:10to the router in this chapter.
01:12So it's important to have whatever prerequisites are necessary for your router
01:16in place before we get started.
Collapse this transcript
Deploying a VPN
00:00When deploying a VPN you have to think about three things right away,
00:04your network router, which contains a firewall of some sort and is performing NAT
00:08most likely, your server, and its firewall settings and your client, and its
00:14compatibility with your available technologies.
00:16The first place we need to go is the router.
00:21We access that usually through a web interface.
00:24Yours may go through a Telnet session on a command line client.
00:28They are all different.
00:29So we are just going to do this here in our web browser. Log in.
00:38Usually this is going to be under some sort of an advanced configuration area.
00:43In ours this is under Advanced and then Firewall Settings over here in the sidebar.
00:50Your router must support passing VPN traffic through to a VPN server.
00:56This mean that the router must support something called ESP, which is not
00:59Extrasensory Perception, but that will be funny.
01:02It's actually Encapsulating Security Payload Protocol, and it has to be passed
01:08for L2TP to work, which is one of the types of VPN supported by OS X Server.
01:14Also necessary but somewhat out there is GRE or Generic Routing
01:19Encapsulation Protocol.
01:21That's necessary for PPTP to work.
01:24So our router calls all that stuff down here at the bottom ALG, or
01:28Application Level Gateway.
01:31You can see that they have labeled PPTP and IPsec VPN right here.
01:36We have got both of those already turned on.
01:38You need to find your router's analogy for this.
01:41Or if you've got this exact same thing, turn this on, because your router has
01:45to be able to pass this stuff through for the traffic to get through the router
01:49over to the server.
01:51Now some routers will pass this automatically and not have an option to turn on
01:55or off, so you don't need to necessarily see something like this.
02:00It may be worth trying anyway.
02:01It might be turned on in the background.
02:03Just give it a shot.
02:04If your router doesn't support either of those, then you can't do VPN unless
02:09you put your OS X Server outside of your router and pass traffic through a
02:14second Ethernet port to your internal network.
02:16That would mean you'd be setting up your server as an Internet gateway and we
02:21covered that in Snow Leopard Server New Features.
02:24Also, on your router you're going to have to port forward the necessary ports
02:28from the WAN side of the router to the IP address of your VPN server.
02:31So we are going to go over here to Advanced again, and then we are going to come
02:35over here to Port Forwarding.
02:37Now under Port Forwarding we need to add rules for L2TP and PPTP to work.
02:44So let's do that now.
02:45We are going to start by adding 1701, and that's the name.
02:51I'm just duplicating the name of the port
02:53so I know what's what here.
02:541701 is going over UDP.
03:00So actually I need to take that out and come down here in 1701.
03:05Your configuration may allow you to put it in a number and then select whether
03:09or not it's TCP, UDP, or both.
03:12In this interface this whole section is one rule and if you put in TCP, it will do TCP.
03:18If you put in UDP, it will do that, and if you put in both, it will do both.
03:22You also have to configure the IP address that this stuff is going to on the
03:25inside of your network.
03:26So ours is our server, which is 192.168.12.2.
03:31So instead of 1701 if I wanted to I could say L2TP, because 1701 is one of the
03:37ports necessary for L2TP.
03:40It's really up to you.
03:41You could even do something like this where you put in 1701 and then type L2TP, if you want.
03:46It's really again up to you.
03:48It's important to make sure that you are allowing this and not denying the
03:51traffic in your Port Forwarding configuration and that you click the check box.
03:55We are going to fast-forward through this so that you don't have to wait through it,
03:58but just so you know we are doing 1701, 4500, and 500 over UDP when we want
04:07to do LT2P VPN, and we are going to do 1723 over TCP for PPTP VPN.
04:14Now be very careful to get the port number and the protocol just right here.
04:24Once you're done, go ahead and scroll back up and save your settings. Make sure
04:28you've saved these settings before you get out of the interface. Otherwise of
04:32course they won't take effect.
04:33Once that's completed, we are going to go back into Server Admin so that we can
04:38configure our firewall to do pretty much the same thing.
04:41We are simply going to allow traffic from those ports.
04:44Click Continue. Double-check to make sure that everything saved, and it did. So we are good.
04:51So what I am going to do now is I am going to quit Firefox, and we will now open Server Admin.
04:57Something else to consider would be deploying a router that has a VPN
05:00server embedded in it.
05:02I recommend using the VPN server built- in OS X Server instead, because your OS X
05:08Server can use your Open Directory users and passwords for access.
05:12If you use your router as the VPN server, you may have to re-enter all of the
05:17names and passwords into that device, which is time-consuming and inefficient
05:22for you, the administrator.
05:24Once in Server Admin click on the Firewall Service, go to Settings, come over to
05:28Services, and we've got our various groups.
05:32I am going to go to any and I am going to select Allow only traffic to these
05:36ports, and what we are going to do is just sort on Description.
05:39This is a very cool trick.
05:41Let's come all the day down here and you will see that all the VPN services are
05:45neatly grouped in the same area.
05:47We are just going to click Allow on all of them and click Save.
05:51Now the reason we're doing this is your firewall will block the VPN traffic if
05:55you don't enable all of the ports in the appropriate firewall address groups
05:59that are necessary for VPN.
06:01Now those would be ESP plus Port 1701, 4500, and 500 over UDP for L2TP and
06:10GRE plus 1723 for PPTP.
06:14If you're only using one of those protocols, don't just enable the firewall for
06:17the other just because. Be specific, but if you're going to be supporting both
06:21which may frequently be the case, go ahead and up them all.
06:25Now we don't need to open those up for the DHCP group, because the DHCP group is
06:30not going to be outside of our firewall.
06:32But I am going to open up the VPN range in here for the group that will be on the VPN.
06:38Of course, for our Server Admin client everything is always allowed.
06:43So we are all good as far as that's concerned.
06:46To configure VPN, you'll need to start with a user account.
06:49And while you can do that in Workgroup Manager, we are going to do it in
06:52Server Preferences.
06:55When we open up Server Preferences, it may ask us to allow or authenticate
06:59access and eventually it will come up and show us our interface.
07:04Now what we can do here is we can add our user accounts and you'll notice right
07:09here that we have not yet been set up to manage users and groups.
07:13So I am going to click the Set Up button right here and it's asking if we want
07:18to host Users and Groups on the server.
07:19We want to say yes.
07:20We are going to say OK.
07:23Now, because the Server Preferences application assumes that you'll be using
07:27an Open Directory master for your users, it's going to create that for you automatically.
07:31Since we've already got DNS setup properly, this won't be a problem.
07:34It will be created just fine, and it won't alter our DNS settings because
07:38everything is configured properly.
07:41One Server Preferences sets up your Open Directory master, at least in 10.6.3
07:44there is a bug where you need to restart your server at this point.
07:48So if you're at a later version where they've fixed that, you can just continue with me.
07:52If you're at 10.6.3 you may want to restart your server at this point so that
07:55you can create a user.
07:58Assuming that you've restarted, if you needed to, let's create that first user now.
08:02We will click the Plus button and we will type in the user's name.
08:05I am just going to use me for now, and a password and verify that password.
08:13Click Create Account and it will create that user.
08:16Now, what I want to show you here is over under the Services tab you can enable
08:21any of the available services for that user and while this won't set up those
08:26services for the user if you don't have them already configured, what it will
08:30do is add your user to the access control list for that service.
08:35So we are just going to use VPN.
08:38So I'm going to turn on VPN.
08:40So that will be putting this user into that access control.
08:44In addition to that, remember we were going to set up a group here.
08:48So we're going to have to do that as well.
08:49Right now, we have a group named Workgroup because that group is set up
08:53automatically during the initial setup of the Open Directory master here
08:56in Server Preferences.
08:57Let's go to Show All, let's go back here to Groups, and let's create a new group,
09:02and we will call this group VPN Users and Create Group.
09:08We are not going to have a File Sharing Folder or iChat Auto Buddies.
09:13Under Members we will click Edit, put a check mark right there, unclick the Edit
09:18Membership button, and we are set.
09:20So we have our VPN users group.
09:22We have our new user, which has access to VPN.
09:25We are almost done with Server Preferences, but I am going to leave it open,
09:29because we are going to come back to this a little later on, and you will
09:32see it's pretty cool.
09:34So let's go back over into Server Admin where we were in our firewall and
09:38looking at our firewall ports and services.
09:41Before we move on to configuring the VPN, I do want to show you what the
09:46Server Preferences did.
09:47We are going to click on the name of our server, come over here to Access and
09:51underneath Services,
09:52if we come down here and click on VPN, you can see that it added the Sean Colins
09:56user to the VPN group.
09:58This is what I meant whenever I was talking about the access controls here for the service.
10:03Let's click over here on Settings > Services and then all the way down here at
10:07the bottom, we've got VPN.
10:09Let's click on that.
10:10Click Save and then when it appears in the sidebar click on VPN and it will
10:16take you straight to Settings.
10:17We are going to start here in L2TP.
10:20Now remember we specified what our VPN address ranges were going to be back
10:25when we were planning our firewall address groups and DHCP range.
10:28So we know that we have 192.168.12.128 through 159 available for both L2TP and PPTP services.
10:38I am going to turn this on and I'm going to assign 192.168.12.128 through
10:47192.168.12.143 to L2TP, and I'm going to assign under PPTP 192.168.12.144
11:04through 192.168.12.159.
11:10So that splits that roughly in half.
11:12Now, when configuring L2TP back over here, you have some decisions to make.
11:17Will you use a shared secret?
11:19Will you use Kerberos for authentication?
11:21I am going to assume you're going to use a Directory Service for authentication.
11:26You can select either MS-CHAPv2 or Kerberos for authentication.
11:30Thing is, you're not going to be able to use Kerberos unless your VPN server is
11:35sitting on an external IP address, and that has to do with the way that Kerberos
11:40needs DNS and its IP address and everything to match up properly. If your
11:45Kerberos is on an internal network, once you leave that network Kerberos isn't
11:49going to function properly.
11:50So, you will probably end up needing to use MS-CHAPv2 in the Directory Services,
11:56and then for the IPSec Authentication here in L2TP you have the option of
12:00putting in either a shared secret, or you can use a certificate.
12:04Now we talked about creating certificates back in previous Snow Leopard Server classes.
12:09So I am going to talk to you about the shared secret and how that works.
12:13The shared secret is my personal favorite, because it's secure, and it's easy.
12:17This will probably be the most popular solution, and I recommend it highly as
12:21an option for L2TP VPN authentication, as it's very secure and easy for you to implement.
12:27For that reason I am going to show you how to use a shared secret now.
12:31In the Shared Secret box type a relatively long sequence of numbers, letters,
12:35and characters that make up a password that will be shared between your
12:38server and the VPN clients on each machine that will be configured to connect to your server.
12:44So I am going to put one in now and I'll click Save.
12:51In our SPI analogy this was the part of the process where the black box sent a
12:55password only it knows to a black box far, far away.
12:59You are setting that password here when you add the shared secret.
13:02Now I said we were going to go back to Server Preferences, and this is where we
13:06are going to do that.
13:06I am going to flip back to Server Preferences now.
13:08Now when you enter the Server Preferences application, you can save the L2TP
13:13VPN settings to a file right in here, which can be imported into a client
13:18system and used without ever revealing the shared secret to the person using
13:22the client-side VPN.
13:24We simply click here and save this in a place where we can find it.
13:28I am going to put it on the desktop and there is the file.
13:31This is what you'll end up with and this is the file that you will send to the
13:35client system to be imported later.
13:37Now, if you want to configure your PPTP settings as well, we just go back here
13:42to Server Admin. Click on PPTP.
13:45Once you have the IP range in the IP boxes, you click the check box to either
13:51Allow 40-bit encryption for compatibility only or not.
13:55I recommend leaving this off unless you have a very old PPTP client that
14:00needs to connect to this.
14:02You select whether you are using Kerberos or MS-CHAPv2.
14:05Again, I recommend the MS-CHAPv2 option here, or again you could use your RADIUS
14:09server if you have one.
14:10And once you have that configured, you click Save.
14:13Now pay attention, because there is no shared secret here.
14:17I mentioned that the shared secret is available in some types of VPN, and
14:23this is not one of them.
14:24There really isn't an option for increased security beyond the basic password
14:29configured in Workgroup Manager.
14:31That's entered at the client-side in the VPN Settings in System Preferences.
14:35Let's click Start VPN, and now we can go configure a client to use the software.
14:43Once you've configured L2TP and PPTP, it's important to put client information
14:48into the interface and also configure logging.
14:50So let's click on Client Information next.
14:53You'll automatically have the DNS server set to your server and that's
14:58important, because you'll need to be able to pick up authentication information
15:02and locate services on the inside of the network.
15:05It's good to have this configured in this way.
15:07So please leave it alone.
15:09Under Search Domains, you can add your own server's domain so that you can
15:14autocomplete connections easily just using the host name or the first part of
15:19the name of a resource.
15:20So, if you want to do that it would look like this.
15:25You can also add network routing definitions in order to determine what IP
15:30address and subnet masks are going to be routed privately or publicly whenever
15:35someone is connected over a VPN.
15:38If you leave this unconfigured, however, everything will go through the VPN as
15:42long as you configure all traffic to go over the VPN from the client side,
15:46which I recommend you do.
15:49Under Logging, it's a good idea especially at the beginning when you're first
15:52turning on your service to enable verbose logging.
15:56Click Save and when you've got that finished, click Start VPN.
16:00Next, we need to go over to a client, configure it, test it, and if it doesn't work,
16:04troubleshoot it.
Collapse this transcript
Troubleshooting your VPN
00:00On your client machine it's best to do this while connected to a device that is
00:04outside of your network, and we have accomplished that by connecting via a
00:08cellular modem attached directly to this computer.
00:11This will allow you to VPN into your network and test your settings.
00:14Now, if you have a client machine, but you don't quite know how to do that, just
00:18be sure that your router has an active public IP address, and that it's
00:21configured as I suggested in the last movie.
00:24So go to the Network pane.
00:28Here we are, and you can see we already have our Access Card Active, and it's
00:32got an outside IP address that's not on the network we're on, and it's sending
00:35and receiving traffic.
00:36The first step is we're going to click the Plus button to add a new
00:39network configuration.
00:40When we do this, we get to a selection where we can add all sorts of
00:46different connections.
00:47We're going to add a VPN here, and the first one we're going to select is L2TP over IPSec.
00:52I'm selecting this first, because it's not going to work, and I want to show you
00:54what that looks like.
00:57It's not going to work because the router we have-- again we said we bought an
01:00inexpensive router to do this class-- doesn't support passage of this and
01:03yours may not either.
01:04I want to show you what that looks like.
01:06So we have our VPN connection here and what I'm going to do is I'm going to
01:10click Import Configurations.
01:13What I've done in the Exercise Files here in a folder called VPN,
01:17I've saved the configuration file that I pulled off of the Server Preferences in the last movie.
01:23I'll open that up and because I only have one VPN connection available here it just
01:28pulls it right into the one that I've got.
01:30If you didn't have one of these, it would create a new one for you and if
01:34you already had a bunch, it would ask you which one you wanted to import the
01:37configuration into.
01:38So anyway, now that we are here, you'll note that we're using the server address.
01:42I'm going to show you how that works right now.
01:44We know that this server does actually work out here with DNS on the Internet.
01:48So that's fine from where we are right now.
01:50I'm going to put in my account name.
01:52Under Authentication Settings, I'm going to put in my password for that account.
01:56Remembe, how I said the shared secret would be imported for you
01:59automatically? Well there it is.
02:01Click OK, click Apply, and click Connect.
02:04Now, while it's doing that, you'll notice then in the upper corner here we've
02:07got a VPN icon here with the word Connecting.
02:11If we go to Utilities and we go to the Console, click OK, it's warning us
02:16that it didn't connect.
02:17If we open up Console and we look at All Messages, we can see right here
02:20that we've got pppd and the racoon process, and those processes are showing
02:27us what they're doing.
02:28They're initiating the attempt of the connection.
02:30We can see here that server. groundswellgear.com is where it's going to and that
02:34the DNS is working properly, because we have the IP address right here.
02:38So we know that's functioning.
02:39If we pull this out, we can get a better view of the entire window here.
02:43The IPSec connection is started.
02:45It's trying to make its connection.
02:46The IKE Packets are being transmitted successfully, but the IPSec connection
02:50is failing every time.
02:52So if we look at the server logs, if we come over here to Server Admin, we can
02:57see that during that time code in the 1:50 range,
03:01there is just nothing there.
03:02The last stuff that we had was when we were doing some stuff before we started
03:05this recording that was about 10 minutes ago.
03:07So it's not even hearing these requests. The server is not seeing this traffic at all.
03:13What that indicates for us is that our router or something in between us and our
03:17router is not letting us get through to the server or our firewall is not
03:21configured properly.
03:23But if we go back to our Firewall and we look at our Settings, we know that
03:26this is hitting the any group.
03:27So if we just sort on Description, and scroll down to where it says VPN, all of
03:32the VPN stuff is active.
03:34There is just not much else that we can do here.
03:37So the firewall is configured correctly, our router we know we've got every
03:41option turned on that we can turn on, and we've got our port forwarding
03:45configured properly.
03:46L2TP looks like it is not going to work for us.
03:49So this is a really good example of a time when it's a good idea to fall back to
03:54that PPTP configuration.
03:56So let's do that one next.
03:58I'm going to click the Plus button, go in to select VPN, and I am going to select PPTP.
04:04Now, you might also notice here that we have Cisco IPSec.
04:07Now, in 10.6, the client has a really good Cisco IPSec client.
04:13So if your server is running Cisco VPN software, you can connect to it right from here.
04:18You don't need the Cisco third-party VPN client anymore, which is nice, but
04:22we're not teaching that.
04:23We're teaching OS X Server.
04:24So we're going to PPTP, and I'm going to name this lynda PPTP VPN and click Create.
04:31Now, when you do that, I'm not going to be able to import the configuration as I
04:36did before because the configuration that's exported from the Server Preferences
04:40is only for the L2TP service. Keep that in mind.
04:44We click on PPTP.
04:46We put in the server address.
04:47I'm going to go by the name again, but you can go by your IP Address.
04:52Nice thing about using the IP address is that your DNS isn't working from
04:56whatever remote location you're in,
04:57the IP Address will still go through, but we are going to use DNS right now.
05:01And put our account name in. Under Authentication Settings we'll put in our password.
05:07Again, no opportunity here to put in anything beyond a password.
05:11There is no additional machine level authentication. So that's it.
05:15That's all you need to do and whenever we do that, we can also come into here
05:20into Advanced and we can tell it to send all traffic over the VPN connection.
05:25This is really useful.
05:26It does tax your Internet connection, and it also taxes your server a little bit
05:31more than it would if you left this off.
05:33But the plus side of this is that you know when you're connecting remotely that
05:38all of the traffic coming off of your remote machine into your server is going
05:42to be in that encrypted private tunnel, and that's a really good thing.
05:46So I am going to leave the rest of this as default.
05:49VPN on Demand is possible here, and this can be another thing that's really cool.
05:55You can configure this for clients that perhaps don't always remember to
05:59activate the VPN when they should.
06:01What you can do here is say, "hey!
06:03Anytime I'm going to access corequick. com as a domain, I'm going to have that
06:09automatically connect up to the VPN."
06:12Nifty thing there is once you hit OK on that, if you go to corequick.com,
06:16the VPN will automatically start to connect before it makes that connection to that
06:19domain, and that would be for e-mail or to get to the web site, or for any
06:23traffic that goes to that domain.
06:25It's a useful thing to put in place.
06:26I'm going to take that out right now, because I don't want to test that at the moment.
06:30We want to leave IPv6 off and this is going to be true until we get IPv6
06:34straightened out across the board, across all of our network devices everywhere.
06:38So for now I'm just recommending you turn this off on just about everything.
06:41Under DNS, we're going to pick this up from the VPN server, so we don't need to
06:45reconfigure anything here.
06:47We're not using any proxies.
06:48So these are all solid.
06:50Since it's our first connection, it could be useful to turn on verbose logging however.
06:54So let's just leave that on there, and we'll hit OK and Apply.
06:59Then when we're done, we click Connect.
07:02So you see, PPTP is pretty quick and it makes that connection and once you have
07:07a connection you'll get a counter up here in the upper-right corner that gives
07:10you how long you've been connected to the VPN.
07:13Once you're in the Network System Preferences, you can come here and look at a
07:16little bit more detailed information about what your IP address is once you've
07:20got into the network.
07:22Again, this is one of those IP addresses in that VPN range that we set up in our
07:26VPN settings of Server Admin.
07:28So this is how you get VPN to work on the client system, and we went into the
07:35logs just briefly here on the client.
07:37This is a great place to go for troubleshooting.
07:39And remember, look for these pppd and racoon processes to give you an idea of
07:45what's going on, on your client's side.
07:48When you want to check your VPN logs over here for the server, just come into
07:52the Server Admin VPN service if you don't have immediate access to your server,
07:56and you can see the VPN D log right here.
08:00It's telling you exactly where that's located.
08:02It's in var/log/PPP, and it's in the vpnd.log and of course like you did in
08:08the other services that we showed during this title, you can always go into
08:12the server and just double-click on that log, and it will open up in Console
08:15on the server itself.
08:16So I hope this helps you to configure VPN so that it functions well for your environment.
08:22One side note.
08:23We've been mentioning throughout this title that we did not use an AirPort
08:26Base Station because we couldn't get NAT and DHCP to work independently of one another.
08:31But one of the cool things about an AirPort Base Station would be that it does
08:35indeed support the L2TP VPN protocol very, very nicely and configuring that port
08:41forwarding is extremely easy in that device.
08:43So if you prefer to have that and you want to go out and buy a device that is
08:47sure to work, that AirPort Base Station either the Extreme or the Express would
08:52work very well for that.
08:54So that's it for VPN client and troubleshooting.
Collapse this transcript
Conclusion
Goodbye
00:01I have had a lot of fun with this course and though the subject is really
00:03complicated, I hope the way I approached it felt fun, easy, and natural to you.
00:08If you want to find more information about DNS and networking services,
00:13please remember that Apple has several great books and PDFs out on the subject.
00:18Hopefully, you have what you need now to configure the services we discussed in
00:22the course and you understand the principles involved so you're primed to take
00:26your learning to the next level.
Collapse this transcript


Suggested courses to watch next:

Mac OS X Lion Essential Training (6h 4m)
Christopher Breen


Unix for Mac OS X Users (6h 35m)
Kevin Skoglund

Installing Apache, MySQL, and PHP (2h 43m)
David Gassner


Are you sure you want to delete this bookmark?

cancel

Bookmark this Tutorial

Name

Description

{0} characters left

Tags

Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading
cancel

bookmark this course

{0} characters left Separate tags with a space. Use quotes around multi-word tags. Suggested Tags:
loading

Error:

go to playlists »

Create new playlist

name:
description:
save cancel

You must be a lynda.com member to watch this video.

Every course in the lynda.com library contains free videos that let you assess the quality of our tutorials before you subscribe—just click on the blue links to watch them. Become a member to access all 98,695 instructional videos.

start free trial learn more

If you are already an active lynda.com member, please log in to access the lynda.com library.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Get access to all lynda.com videos

You are currently signed into your admin account, which doesn't let you view lynda.com videos. For full access to the lynda.com library, log in through iplogin.lynda.com, or sign in through your organization's portal. You may also request a user account by calling 1 1 (888) 335-9632 or emailing us at cs@lynda.com.

Access to lynda.com videos

Your organization has a limited access membership to the lynda.com library that allows access to only a specific, limited selection of courses.

You don't have access to this video.

You're logged in as an account administrator, but your membership is not active.

Contact a Training Solutions Advisor at 1 (888) 335-9632.

How to access this video.

If this course is one of your five classes, then your class currently isn't in session.

If you want to watch this video and it is not part of your class, upgrade your membership for unlimited access to the full library of 1,899 courses anytime, anywhere.

learn more upgrade

You can always watch the free content included in every course.

Questions? Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com.

You don't have access to this video.

You're logged in as an account administrator, but your membership is no longer active. You can still access reports and account information.

To reactivate your account, contact a Training Solutions Advisor at 1 1 (888) 335-9632.

Need help accessing this video?

You can't access this video from your master administrator account.

Call Customer Service at 1 1 (888) 335-9632 or email cs@lynda.com for help accessing this video.


site feedback

Thanks for signing up.

We’ll send you a confirmation email shortly.


By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

By signing up, you’ll receive about four emails per month, including

We’ll only use your email address to send you these mailings.

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked