Log off the DIR-655.

Defining Network Infrastructures and Network Security | 173 connectivity for the entire LAN to the Internet. The firewall also hides the LAN IP addresses. By default, the IP address 87.69.11.124 should be completely shielded. This means that all inbound ports are effectively closed and will not allow incoming traffic, unless a LAN com- puter initiates a session with another system on the Internet. Regardless, you should check this with third-party applications such as Nmap or with a web-based port scanning utility like ShieldsUP. We will show these in upcoming exercises. If any ports are open, or unshielded, they should be addressed immediately. Then, the firewall should be rescanned for vulnerabilities. Many of today’s firewalls have two types of firewall technologies built into them: SPI and NAT. However, there are a couple other types of firewall methodologies of which you should be aware: • Packet filtering inspects each packet that passes through the firewall and accepts or rejects it based on a set of rules. There are two types of filtering: stateless packet inspec- tion and stateful packet inspection SPI. A stateless packet filter, also known as pure packet filtering, does not retain memory of packets that have passed through the firewall. Because of this, a stateless packet filter can be vulnerable to IP spoofing attacks. However, a firewall running stateful packet inspection is normally not vulnerable to this because it keeps track of the state of network connections by examining the header in each packet. It should be able to distinguish between legitimate and illegitimate packets. This function operates at the network layer of the OSI model. • NAT filtering, also known as NAT endpoint filtering, filters traffic according to ports TCP or UDP. This can be done in three ways: using basic endpoint connections, by matching incoming traffic to the corresponding outbound IP address connection, or by matching incoming traffic to the corresponding IP address and port. • Application-level gateway ALG supports address and port translation and checks whether the type of application traffic is allowed. For example, your company might allow FTP traffic through the firewall, but it may decide to disable Telnet traffic. The ALG checks each type of packet coming in and discards those that are Telnet packets. This adds a layer of security; however, it is resource intensive. • Circuit-level gateway works at the session layer of the OSI model when a TCP or UDP connection is established. Once the connection has been made, packets can flow between the hosts without further checking. Circuit-level gateways hide information about the private network, but they do not filter individual packets. Examples of network firewalls include the following: • The D-Link DIR-655 SOHO routerfirewall used previously • Cisco PIXASA firewalls • Juniper NetScreens • Microsoft’s Internet Security and Acceleration Server ISA and Forefront CONFIGURE A SOHO FOUR-PORT FIREWALL GET READY. Let’s explore where to go on a SOHO router to turn on SPI and NAT filtering firewalls. To do so, perform these steps:

1. Access the D-Link DIR-655 router at the following link:

http:support.dlink.comemulatorsdir655133NAlogin.html

2. Log in no password is required.

3. On the main Device Information page, click the Advanced link near the top of the

window. This should bring up the Advanced page.

4. On the left side, click the Firewall Settings link. This should display the Firewall

Settings window. Scan whatever fire- wall you are running with Nmap or an online scanner such as ShieldsUP TAKE NOTE 174 | Lesson 8 5. Take note of the first setting: Enable SPI. This is stateful packet inspection. It should be selected by default, but if not, select it and move on to the next step.

6. View the NAT Endpoint Filtering section directly under the Firewall Settings. Increase

the security of UDP Endpoint Filtering by clicking the radio button Port and Address Restricted.

7. Next, enable anti-spoofing by clicking the Enable anti-spoofing checking check box.

8. Finally, scroll down and view the Application Level Gateway ALG Configuration.

PPTP, IPSec VPN, RTSP, and SIP should all be selected. SCAN HOSTS WITH Nmap GET READY. In this exercise, we will scan a computer with Nmap. This vulnerability scanner is best known for its port scanning abilities. We will use this tool to scan for open ports on a computer.

1. Download and install the command-line version of the Nmap program. You will also be

prompted to install the WinPCap program.

2. Extract the contents to a folder of your choice.

3. Write down the IP address of a Windows host on your network. For this example, we

will use a host with the IP address 10.254.254.208.

4. Scan the ports of that host with the –sS parameter for example,

nmap –sS 10.254.254.208. 5. If there are non-essential ports open, turn off their corresponding unnecessary services, such as FTP or HTTP. This can be done in a variety of places, including Computer Management. If there are no services that you wish to turn off, enable one and then rescan the ports with Nmap to show that the service is running, turn off the ser- vice, and move on to the next step.

6. Scan the ports of that host a second time, once again with the –sS parameter. This

time, you are verifying that the services are turned off by identifying that the corre- sponding ports are closed.

7. If possible, scan the ports of a four-port SOHO routerfirewall or a computer with a

firewall running. Use the –P0 parameter for example, nmap –P0 10.254.254.208. This may take up to five minutes. Doing this will verify whether the firewall is run- ning properly by displaying that all of the ports are filtered. The –sS option we used previously will not work on a fully firewalled device because the initial ICMP packets from the ping will not be accepted. –P0 does not use ICMP packets, but it takes longer to complete. SCAN THE INTERNET CONNECTION WITH ShieldsUP GET READY. There are several online port scanners available. This exercise requires an Internet connection in order to access one of them. This exercise will scan the ports of whatever device is facing the Internet. This could be the local computer if it connects directly to the Internet or a four-port router, or perhaps a more advanced firewalling device. It all depends on your network scenario.

1. With a web browser, connect to www.grc.com.

2. Click on the ShieldsUP picture.

3. Scroll down and click the ShieldsUP link.

4. Click the Proceed button.

5. Select the Common Ports scan. This will initiate a scan of the computer or device

that is being displayed to the Internet. If you access the Internet through a router