Showing posts with label firewall tutorial. Show all posts
Showing posts with label firewall tutorial. Show all posts

Thursday

Watchguard Firewall Tutorial : How to configure http proxy


Watchguard Firebox Configuration : A case study:
Today we are going to configure the firewall of a college, in such a way that
Students should access only certain web sites.
Teachers can access some extra sites.

Point : 1

What we are going to configure can be called as CONTENT FILTERING OR HTTP PROXY CONFIGURATION.

Point 2 :
There are two kinds of people in the college. 1. Teachers 2. Students. All of them should have username and password.
These usernames should come under the user-group TEACHER, STUDENT. Then only you can configure teachers and students differently.

Point 3. All the users(teachers and studuents) must login before browsing anything. Then only the firewall will know whether you are a teacher or student.


Point 4:
The usernames can be stored using different methods such as Active Directory, local authentication, Radius, or LDAP.
Imagine, this college is maintaining the user accounts in ACTIVE DIRECTORY Server. Check here to know how to install active directory


Point 5: You have to create HTTP Proxy policy for TEACHER group and STUDENT group separately. and configure these policies to restrict the access.

Point 6: Whenever a computer in the college tries a web site, the firewall should check whether this user is authenticated. If not, he should be redirected to authentication Page. For doing this job, you have to create another policy.
Policy Manager > Edit > Add > Policies > select 'http proxy' > click ADD.
Give the name 'http-proxy-students' to this new policy
Now, Add the user group 'Students' to this policy.
Set the Properties, ie. Restrict the freedom of our students :
1. If the user is idle for more than 10 minutes, he will be automatically logged out.
2. If the length of the URL is greater than 2048 bytes, then, deny this request.
3. Select the following categories for blocking : chat, adult, hacking,criminal activity
Point 6 : Web blocker is another server. Once you are mentioning the ip address of the web blocker,
the categories in the web blocker is listed here and now you can select certain categories.


Point 7: In the same way, you can configure the web blocking for TEACHER group.

Point 8: Let us create the last policy 'http-proxy-redirect' to redirect the users to login page.

Cut and paste the text below to the Deny Message text box. This contains XML commands that will automatically redirect users to the authentication page at https://<your firebox IP address>:4100.
Content-type: text/html; charset="iso-8859-1"
<html>
<META HTTP-EQUIV="Refresh"
CONTENT="15;url=https://?.?.?.?:4100/">
<h3> %(transaction)% denied by WatchGuard HTTP proxy. </h3>
<b> Reason: </b> %(reason)% <br>
<hr size="1" noshade>
<b> Method: </b> %(method)% <br>
<b> Host: </b> %(url-host)% <br>
<b> Path: </b> %(url-path)% <br>
<hr size="1" noshade>
<p>You have not authenticated yet. You will be redirected to the Firebox
Authentication page in 15 seconds.</p>
<p>To go there immediately, click <a
href="https://?.?.?.?:4100/">here</a>.</p>
</body>
</html>

Edit this text to replace "?.?.?.?" with the IP address of your Firebox.
Click OK to close the Edit HTTP Proxy Action Configuration dialog box.
Click OK to close the New Policy Properties dialog box.
In Policy Manager, select File > Save > To Firebox to save the configuration changes to the Firebox.
WebBlocker is now configured to use different policies for different groups of authenticated users, and will automatically redirect unauthenticated users to the WatchGuard authentication page.
See also

If you choose, you can change the name of the proxy policy. To change the name, type a new name in the Name text box.
In this example, we call the proxy policy HTTP-proxy-Students.
In the Policy tab, in the From section, click Add to add the user group for this policy.
In this example, we add the Active Directory group Students.
Select the Properties tab.
Click the View/Edit Proxy icon.
The HTTP Proxy Action Configuration dialog box appears.

Video tutorial : How to create Active Directory

Many organizations want to allow different levels of access to web sites for different groups of users. To do this, you must: Define the different groups of users on your authentication server. Add an HTTP proxy policy for each group of users. The policy includes WebBlocker configuration settings for that group. Add an HTTP proxy policy for non-authenticated users that automatically redirects them to the WatchGuard authentication page. Example scenario To show an example throughout this topic of how to set up this configuration, we use an educational setting that wants to define different levels of web access for two groups: Students (more restricted access) Teachers (less restricted access) Define groups on the authentication server First, you must set up user authentication. You can use any authentication method, such as Active Directory, local authentication, Radius, or LDAP. For information about the supported authentication methods, see Authentication server types. In the example described in the previous section, we assume that the school has configured their Firebox to use Active Directory for authentication. You must then define the user groups in the authentication server that correspond to the different WebBlocker policies you want to use. In this example, we define the groups Teachers and Students on the Active Directory server. Create an HTTP policy for the group you want to have the most restricted access In Policy Manager, click the plus (+) sign on the Policy Manager toolbar. Or select Edit > Add Policies. The Add Policies dialog box appears. Click the plus (+) sign on the left side of the folder to expand the Proxies folder. A list of proxies appears. Click the HTTP proxy. Click Add. The New Policy Properties dialog box appears.

Video Tutorial: How to Open Ports in Windows XP firewall

Step by step tutorial explaining how you could open ports in windows firewall .

Video tutorial : How to configure a PIX Firewall

Tutorial covering the PIX 501 506 506E 515 525 535 ASA 5505 5510 5520 5540 5550 for Remote Desktop Protocol (RDP) over the internet. Commands include Static NAT, Access List and Access Group.

Watchguard Firewall Tutorial

Some important features of WatchGuard firewall : Firebox X edige.

Video showing how phishing attack carried out on a US Bank

Video Tutorial : Watchguard firewall :Firebox : Wireless Settings

Video Tutorial : How Password crackers work

Sunday

Madhans Tutorial : Firewall (Introduction)

Madhans Firewall (page-1)

 

Objectives of this Article

 

    • What is Firewall?
    • What is stateful firewall?
    • What is DMZ?
    • How to configure the free comodo firewall ?
    • What is Port Scan?
    • What is RootKit?
    • What is FinAttack?
    • What is gratuitous ARP?

 

 

What is Firewall?

  • A firewall separates your trusted computers on the internal network from the external network, or the Internet, to decrease risk of an external attack..
  • Firewalls can be implemented in either hardware or software, or a combination of both.
  • All data entering or leaving the LAN passes through the firewall which allows only the data meeting the administrator’s rules.
firewall with dmz

What is Packet Filtering Firewall?

A packet is made up of fields like Source IP Address Destination IP Address, the protocol and actual data. In Packet filtering, only the address and protocols are examined, and NOT the data.

A sample packet :

The above message is decoded :


0a 0a 02 1c is Source IP Address (It is the hexa decimal of 10.10.2.28)
0a 0a 01 07 is Destination IP address (It is the hexa decimal of 10.10.1.7)

The above message is decoded as given below:
00 50 ba d9 80 00.. Destination MAC address
00 e0 4c c5 64 f4..... Source MAC address ( 00e0 4c is Realtek Co)
08 00.......................Protocol type is IP
-------------------IP Packet starts here---------------------------
4=IP version 4;5.=5 x 4 =20. The IP Header length is 20 bytes
00=Differentiated Services. The default value is 00;

00 3c=Total number of bytes=60
b1d0= Packet ID;0.=Flag (x---.=Reserved bit,-x--=Dont Fragment,--0-=More Fragments)
000=Fragment Offset;80=Time to live is 80 ( in decimal it is 128)
01=.Protocol is ICMP;

71 ba= Header checksum
0a 0a 02 1c=Source IP Address (It is the hexa decimal of 10.10.2.28)
0a 0a 01 07=Destination IP address (It is the hexa decimal of 10.10.1.7)
-------------------icmp message starts here--------------------------
08=Type of message-8 means Ping echo request;00=code0;

22 5c =Checksum
02 00=Identifier;29 00=Sequence Number
61 62 63….68 68=Data (in ascii it is abcdefghijklmnopqrstwabcdefghi)

netstat screencapture


What is Stateful Firewall?


A Stateful firewall performs stateful inspection on the packets. It keeps track of the state of TCP and UDP connections traveling across it. The firewall is programmed to distinguish legitimate packets .The stateful firewall depends on the three-way handshake of the TCP protocol.

arp broadcast message

Proxy Server Firewall:
Proxy server allows all clients to access Internet with different access limits.
• It keeps the machines behind it anonymous mainly for security.
• It speeds up access to a resource (via caching). It is commonly used to cache web pages from a web server
? Circuit Level Gateway Firewall:
This firewall determines whether the connection between both ends is valid according to certain rules and creates a session for the connection. The connection rules are normally based on the following:
• Source IP address and Port
• Destination IP address and port
• Time of Day
• Protocol
• User id and Password

Stateless firewall versus Stateful firewall
Before the advent of stateful firewalls, a stateless firewall which treats each network packet in isolation was normal. Such a firewall has no way of knowing if any given packet is part of an existing connection, is trying to establish a new connection, or is just a rogue packet. All Modern firewalls are stateful firewalls.

DMZ
Demilitarized Zone is abbreviated to DMZ. It is a subnetmask that contains and exposes an organization's external services to the untrusted Internet. The purpose of a DMZ is to add an additional layer of security to an organization's Local Area Network (LAN); an external attacker only has access to equipment in the DMZ.

 

Posted by: Madhan

what is firewall,what is dmz what is packer filtering firewall,what is stateful firewall

Madhans Tutorial : Firewall (comodo firewall)

Madhans Firewall (Comodo Firewall install and configure)

Comodo is a free software firewall.
Let us install this software and learn the concepts of firewall.

 

 

How an ICMP flood can affect the working of a Server?

How to block DoS attack using Comodo firewall?

TCP Flood / UDP Flood / ICMP Flood attacks happen when thousands of packets of data are sent from a spoofed IP source address to a victim's machine. The victim's machine automatically sends back a response to these requests (a SYN packet) and waits for an acknowledgment (an ACK packet). But, because they were "sent" from a spoofed IP address, the victim's machine will never receive any responses/acknowledgment packets. This results in a backlog of unanswered requests that begins to fill up the victim's connection table. When the connection table is full, the victim's machine will refuse to accept any new connections - which means your computer will no longer be able to connect to the Internet, send email, use FTP services etc.

By default, Comodo Firewall is configured to accept traffic using TCP, UDP and ICMP protocols at a maximum rate of packets per second for a set duration of time. The defaults are for all three protocols are set at 20 packets per second for a continuous duration of 20 seconds. . If these thresholds are exceeded, a DOS attack is detected and the Firewall goes into emergency mode.

The firewall will stay in emergency mode for the duration set by user. By default this is set at 120 seconds. Users can alter this time length to their own preference by configuring How long should the firewall stay in emergency mode while the host is under DOS attack? In emergency mode, all inbound traffic is blocked except those previously established and active connections. However, all outbound traffic is still allowed.

 

 

What is Port Scan?

How to block the hackers who are to trying to do port scan on your server?

Port scanning, a favorite approach of computer cracker, gives the assailant an idea where to probe for weaknesses. Essentially, a port scan consists of sending a message to each port, one at a time. The kind of response received indicates whether the port is used and can therefore be probed for weakness.

Comodo Firewall detects the most common forms of port scans, alerting you and temporarily blocking the banning the IP address of the scanner, ensuring that they are "cut off" before they can discover any useful information about your system.

Users have the option to configure how long to block incoming traffic from a host suspected of perpetrating a port scan. If a port scan is detected, the Firewall identifies the host scanning your system as suspicious and automatically blocks it for a set period of time - by default 5 minutes. During this time, no traffic will be accepted from the host. During these 5 minutes, the suspicious host cannot access the user's system but the users system can access it.

 

 

What is ARP cache?

How a hacker can attack the arp cache?

How to protect the server from arp attacks?

 

The ARP Cache (or ARP Table) is a record of IP addresses stored on your computer that is used to map IP addresses to MAC addresses. Stateful inspection involves the analysis of data within the lowest levels of the protocol stack and comparing the current session to previous ones in order to detect suspicious activity.

Background - Every device on a network has two addresses: a MAC (Media Access Control) address and an IP (Internet Protocol) address. The MAC address is the address of the physical network interface card inside the device, and never changes for the life of the device (in other words, the network card inside your PC has a hard coded MAC address that it will keep even if you install it in a different machine.) On the other hand, the IP address can change if the machine moves to another part of the network or the network uses DHCP to assign dynamic IP addresses. In order to correctly route a packet of data from a host to the destination network card it is essential to maintain a record of the correlation between a device's IP address and it's MAC address. The Address Resolution Protocol performs this function by matching an IP address to its appropriate MAC address (and vice versa). The ARP cache is a record of all the IP and MAC addresses that your computer has matched together.

Hackers can potentially alter a computer's ARP cache of matching IP/MAC address pairs to launch a variety of attacks including, Denial of Service attacks, Man in the Middle attacks and MAC address flooding and ARP request spoofing. It should be noted, that a successful ARP attack is almost always dependent on the hacker having physical access to your network or direct control of a machine on your network - therefore this setting is of more relevance to network administrators than home users.

Checking this option makes Comodo Firewall to start performing stateful inspection of ARP (Address Resolution Protocol) connections. This will block spoof ARP requests and protect your computer from ARP cache poisoning attacks.

 

What is "Gratuitous ARP"?

When I searched the Internet for the pronounciation of this word, I stepped into an excellent site. Please go to this site for the meaning and pronounciation. you will really enjoy this site.

Ok.....mmmm..mm


Gratuitous ARP could mean both gratuitous ARP request or gratuitous ARP reply. Gratuitous in this case means a request/reply that is not normally needed.

In gratuitous ARP request message, the source and destination IP are both set to the IP of the machine issuing the packet and the destination MAC is the broadcast address ff:ff:ff:ff:ff:ff. In normal circumstances, no machine will reply to this request.

But......

Gratuitous ARPs are useful in the following conditions:

They can help detect IP conflicts. When a machine receives an ARP request containing a source IP that matches its own, then it knows there is an IP conflict.
When you change the NIC card of your PC, your pc has to send the gratuitous arp so that all machines in your LAN will correct their ARP entry.

When the switch receives this gratuitous ARP, it will make suitable modification in its table.

Whenever the PC is booted, the PC will send the gratuitous arp. If the ethernet link is down, when the link comes up, at that time also, this gratuitous arp is sent. (If the ethernet cable or the nic is having problem, then that pc will generate lot of gratuitous arp. ). courtesy: wireshark.org

.


Now a question for you.....

If you are able to answer correctly, then you have understood the exact meaning of INBOUND and OUTBOUND traffic.

Question: Comodo firewall has been installed in your PC and you are configuring this comodo in such a way that ALL INBOUND IP TRAFFIC TO THE APPLICATION "IEXPLORE.EXE" is BLOCKED. (see the configuration screenshot below)

Now the question is , if I try "google.com" using the Internet Explorer from the same PC, whether I will google.com or not.

 


Answer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| You will still get google.com. you have to block the outgoing connection not the incoming. When you type google.com in the browser, the browser will make an OUTGOING CONNECTION not an incoming connection.

Now , the second Question for you !!!!!!!!!

 

In the comodo firewall, you are setting the GLOBAL rules as shown here:

Block all outgoing IP traffic

 

But you are setting the APPLICATION Rules like this:

Allow all outgoing IP traffic of Iexplore.exe application.

The question is whether you will get google.com using the internet explorer or not.

go down to see the answer:


        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
|

still down please....

        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |
        |

 

Answer:

No, you will NOT get google.com. Even though application rules have allowed the traffic, it has to pass through the global rules also.

Confused? See the given figure


Still confused? Dont worry. come to the same place tomorrow and read again. :)