Thursday, October 7, 2010

collections in java

it cantains list,map,set..........

Wednesday, September 22, 2010

What is subnet Mask

subnet (short for "subnetwork") is an identifiably separate part of an organization's network. Typically, a subnet may represent all the machines at one geographic location, in one building, or on the same local area network (LAN). Having an organization's network divided into subnets allows it to be connected to the Internet with a single shared network address. Without subnets, an organization could get multiple connections to the Internet, one for each of its physically separate subnetworks, but this would require an unnecessary use of the limited number of network numbers the Internet has to assign. It would also require that Internet routing tables on gateways outside the organization would need to know about and have to manage routing that could and should be handled within an organization

List of important port number

15  Netstat 21  FTP 23  Telnet 25  SMTP 42  WINS 53  DNS 67  Bootp 68  DHCP 80  HTTP 88  Kerberos 101  HOSTNAME 110  POP3 119  NNTP 123  NTP(Network time protocol) 139  NetBIOS 161  SNMP 180  RIS 389  LDAP(Lightweight Directory Access Protocol) 443  HTTPS (HTTP over SSL/TLS) 520  RIP 79  FINGER 37  Time 3389 Terminal services 443  SSL (https) (http protocol over TLS/SSL) 220  IMAP3 3268 AD Global Catalog 3269 AD Global Catalog over SSL 500  Internet Key Exchange, IKE (IPSec) (UDP 500)

Gateways

A system that bridges two systems.


A computer connected with various computer, wants to transfer a packet, can transfer dirctly to the router by giving router address as gateway address at ip address portion.


Gateways are used to connect two dissimilar lan’s .


Gateways work in application layer of osi model.


A gateway is required to convert data packets from one protocol formate to another before forwarding it, as it connects two dissimilar networks.

IP Packet Security

IP PACKETS HAVE NO INHERENT SECURITY – NO WAY TO VERIFY,


• How to ensure that, the data has not been modified in transmit.


• How to ensure that, the data has not been viewed by the third party.


• How to ensure that, the data that you have received is from the right person (from the true sender).


• What about, Non repudiation.


Hence,


IPSec provides an automated solution for these three areas,


1. Authentication


2. Integrity


3. Confidentiality


4. Encryption


Standard IP Packet:






First, data.


The data is encapsulated/wrapped by TCP Header, which determines the destinations application on the machine your sending to .


It determines for which application data is ment for. by sending port number of the application


Example: 80 for HTTP, 21 for FTP….


IP Header is encapsulated/wrapped on TCP Header.


IP Header determines where the data should go on the physical network.


It takes care of taking data from one computer to another computer on the network/ internet.


Once the data reaches destination first IP Header is removed, then TCP Header says where the data should go with the destination system and finally when it gets to that location TCP Header is also removed, the data is reassembled and delivered to the application.


NOW THE DIFFERENCE BETWEN STANDARD IP PACKET AND IPSEC PROTECTED PACKET IS THAT,






IPSec Packet:






First, data


Data is encapsulated with TCP Header.


Then, IPSec Header is encapsulated


And now IP Header is encapsulated


IPSec is application independent because of which it enables authentication, integrity, confidentiality, encryption into the system.





How to implement IPsec enabled communication?


IPSec can be implemented through polocies that enforce a set of packet filters on inbound or outbound traffic.


Filters set to or (with the help of filters you can):


• Block


• Permit


• Negotiate security (encrypt)


IPSec policies used to:


• Protect contents of IP packet.


• Defends against network hacks.






1.


IPSec can be enabled through “IP Sec policy editing tool” -


• open this editing tool via “mmc”


• Go to run > type “mmc”> file>add/remove snap in > Add > select “IPSec policy management” and click “Add”> local computer > finish > ok.


• And you can now see three policies at the right side of the window “client (respond only)”, “server(request security)”, “secure server(require security)”.


• To implement any of the policy , right click policy and click on ” Assign “.The policy will be enabled.


To implement IPSec policies on active directory users or on organizational unit.


• Right click organizational unit>properties>Group policy> ” new ” give a name and ” edit ” >


• computer management > windows > security settings > IP Security policy on active directory and you will see three preloaded filters/policies.


• You can assign or unassign any policy.






Configuring IPSec policies


Default policies:


1. Client (Respond only):System won’t use IPSec unless requested.


2. Server (Request security):Try to initiate IPSec communication whenever possible.


3. Secure Server(Require Security):Disallow any communication that does not use IPSec.


4. Can only assign one policy at a time.










2.


IPSec works under IP Layer of TCP/IP model.


Type ” secpol.msc ” in run to open IP Security policy console.


Need to set rules (must be defined) : what type of packets must be blocked or encrypt or filtered or.. when packets communicate from ipaddress 192.168.1.1 192.168.1.10


Policy Rules


• Tell IP sec how to behave(encrypt certain communication, sign other communication, etc.)


• A rule is defined by the combination of IPSec actions + IPSec Filters


• Filter: only activate the rule if traffic comes from ip address 192.168.2.23 and uses FTP.


• Action: encrypt the traffic






Go to IP security management on local computer > right click ” Manage IP Filter list and filter actions “ > under “ manage filter actions ” > click ” Add ” > welcome screen > next > give name as ” block ” and next> select ” block” and next> “finish” > Now go to the Assigned policy > properties > under rules, double click on ” ALL ICMP Traffic ” > under filter action , select ” Block ” > ” Apply ” and ” Ok “.


the above rules is If the filter match’s icmp traffic or ping traffic the action is to block the traffic.














3.


Above is for default policies and if we want to set our own policy rule , example


when ever system 23 communicate with system 100 vice-cersa their communication must be encrypted(secure).






IPSec policy Example:


Two systems: 192.168.2.23 and .100


Filter: Triger rule when traffic to .23, over any port.


Action : Encrypt data.


Authentication: preshared key – bosco


Create filters and actions, then build the rules into the policies at both the machines.






Steps:


1. start > run > secpol.msc >


2. First, we are going to create a new filter,


3. Rightclick on IP Security policies on local computer > Manage IP Filter lists and filter actions, > under Manage IP Filters click ” Add ” > Add > source address: My ip address, Destination address: a specific ip address:192.168.2.23 , ok > under protocol, select ANY>under description, traffic to 23 and click on ok > ok >


4. Then , we need to create an action,


5. Under Manage filter actions, click ” Add ” > Select ” Negotiate Security “ , click on ” Add ” and select ” Integrity and encryption ” (data will be encrypted and verified as authentic and unmodified). > ok > ok > close.


6. Now we need to create a new ip security policy that will use a rule that will assemble both filter and action that we just created(defined).


7. Right click on ” IP Security policies on local computers ” > select ” create IP Security policy ” > a welcome wizard opens, click next > Name: traffic to computer 23, next > uncheck ” activate default response rule “, next > finish


8. A dialog box containing rules & general will open immidiately.Notic that: the ip filter list(dynamic) is unchecked because we said that we created a policy rule. so here you need to attach filter and action you have created. to do this ,


9. click on ” Add ” > under ip filter list, select the ip filter u created and go to > Filter Action, select new filter action u created for encryption. and go to > Authentication method (authentication methods specify how trust is establised between the computers. These authentication methods are offered and accepted when negotiating security with another computer) , click ” edit ” > select use this string(preshared) :type ” bosco “ and click ” OK ” > “apply” , ”Ok” > “Ok” > “OK”.


10. This new Policy is published on the right side window, Eg: traffic to computer 23


11. Right click policy ” traffic to computer 23 ” >”Assign”


12. now after assigning , I have to go to the other computer ( 192.168.2.100) and reverse the process, I have to create a rule which gonna be called traffic to .100 and configure it exactly in the same way that you did here at 192.168.2.23 using same preshared key.


13. Test by pinging 192,168.2.23 and .100 at each other computer.






This is how you can configure your computers to exchange a secure communication within and between computers.

What is switch?

A switch is a device which connects various systems in a network.


Switch maintains MAC address table.


Packets are directly transferred to the destination without broadcasting.


Switch is considered as an intelligent device.


In switch , each packet gets th same speed.


A switch is Full-duplex (can forward & receive simultanously)


Packets are filtered by switches.


No concept of collision domain or No collision as it is full duplex.


Works in “Data link layer” layer 2 and in layer 3






There are two types of switches,


1.Managable switch – has console port,we can make configuration


2.Unmanagable switch – has no console port.






Cisco divided switches in 3 layers:


1.Access layer switches : It works in layer 2 as it understands MAC address only.It doesn’t understand IP address.Switches series – 1900 & 2900


2.Distribution layer and 3.Core layer switches: It works in layer 3 because it understands MAC address as well as IP address. Switches series – 7000 & 10000.


Distribution layer and core layer switches can access millions of packets per second - whereas - Router can access 1 lakh packets per second.

What is an IP?

IP (Internet protocol) is a method or protocol by which data is sent from one computer to another computer on the internet.


Each computer on the internet has at least one IP address that uniquely identifies it from all other computer on the internet.


When you send or receive data (for example , an e-mail or web page), the message gets divided into little chunks called packets.


Each of these packets contains both senders internet address (IP address) and the receivers address.


Any packet is sent first to gateway computer that understands a small part of internet.


The gateway computer reads the destination address and forwards the packet to an adjacent gateway that in turn read the destination address and so forth across the internet until one gateway recognizes the packet as belonging to computer within its immediate neighborhood or domain.


The gateway then forwards the packet directly to the computer whose address is specified.


Because message is divided into number of packets, each packet can, if necessary , be sent by a different route across the internet.


Packets can arrive in the different order they were sent in.


The internet protocol just delivers them(IP Packets).
It is up to other protocol, the TCP/IP to put back in the right order.


Blogspot Template by Isnaini Dot Com. Powered by Blogger and Supported by Home Interiors