Wednesday, 22 October 2014

Group Encrypted Transport VPN (GET VPN)


Ingredients
 -Key Servers (KS)
 -Key Encryption Key (KEK) - used between Key server and GMs for rekeying(TEK),policy push down after IKE phase 1 sa is torn down
 -Traffic Encryption Key (TEK)- 1 SA(key for encrypting/decrypting traffic for all group members)
 -Key Distribution (IKE, Group Domain of Interpretation(GDOI))
 -Group Members (GM)
 -Group SA
 -Rekeying

Why GET VPN?
For other types of VPNs(like site to site VPN), multicast traffic has to send multiple times from Hub to spokes as each spoke has a separate tunnels.
For Flex VPN & DMVPN where dynamic tunnels are built automatically, first few packets might be lost or routed through hub before direct tunnel is built between spokes. This might not be acceptable sometimes.

In GET VPN, they don't need direct tunnel between them and they can still send encrypted traffic.
GET VPN is not the perfect solution for every topology. Default topoloy for GET VPN is designed is for Full Mesh.

In GET VPN, IP header from source A to dest B is not modified; it preserves IP header.So, the ISP or any intermediate routers must know how to route this traffic between source A and dest B. This is different from other VPN types where these source,dest IP headers are hiiden inside IPSec. That's how hub needs to send only once for multicast traffic in GET VPN.
In GET VPN behind IP header, there is still ESP(protocol #50) used by IPSec.

Group members use the same Traffic encryption key(TEK) and same security association (SA).
It is made possible by Group Domain of Interpretation(GDOI).

Which traffic to be encrypted is decided by Policy.
On Key Server, we define what traffic to encrypt/decrypt using ACL.

Who are the GM?
Any device that have registered and authenticated with Key Server.
Group server and Group member authenticate each other using IKE.

GET VPN Configuration

Key Server
R5#crypto isakmp policy 10
  #hash sha256/sha
  #authentication pre-share
  #group 14/5
  #lifetime 180
  #encryption aes 256
  #crypto isakmp key cisco123 address 0.0.0.0

  #crypto key gen rsa general label GETVPN mod 1024 exportable

  #crypto ipsec transform-set Our-TSET esp-aes 192 esp-sha-hmac

  #crypto ipsec profile GDOI-Profile
  #set transform-set Our-TSET
  #set security-association lifetime seconds 300 //traffic encryption key lifetime
!
  #crypto gdoi group Our-GETVPN
  #identity number 6783 //need to match in Key server and group members
  #server local
  # address ipv4 5.5.5.5 //group server address
  #rekey transport unicast //adv of unicast is KS will wait for ack from GM.
  #rekey lifetime seconds 600 //lifetime of key encryption key
  #rekey retransmit 10 number 2
  #rekey authentication mypubkey rsa GETVPN //the one generated earlier

  #sa ipsec 1
  #profile GDOI-Profile //the one we created earlier
  #match address ipv4 101 //acl whether to encrypt the traffic
  #replay time window-size 5
!
  #ip access-list extended 101
  #permit ip 10.0.0.0 0.255.255.255 10.0.0.0 0.255.255.255

  #router ospf 1
  #net 0.0.0.0 255.255.255.255 area 0

R1
  #crypto isakmp policy 10
  #hash sha256/sha
  #authentication pre-share
  #group 14/5
  #lifetime 180
  #encryption aes 256
  #crypto isakmp key cisco123 address 0.0.0.0

  #crypto gdoi group Our-GETVPN
  #identity number 6783 //need to match in Key server and group members
  #server address ipv4 5.5.5.5 //group server address

  #crypto map GETVPN-MAP 10 gdoi
  #set group Our-GETVPN //the one we created earlier

  #int f0/0 //outside interface
  #crypto map GETVPN-MAP
  #ip tcp adjust-mss 1360

  #router ospf 1
  #net 0.0.0.0 255.255.255.255 area 0

sh crypto gdoi
sh crypto gdoi ks policy
sh crypto gdoi ks acl
sh crypto gdoi ks rekey
sh crypto gdoi ks member
sh crypto session

Sunday, 19 October 2014

Public Key Infrastructure - PKI - Certificates


PKI
Authenticate CA (R1 request CA's public key from CA)
Enrol (R1 sends public key portion of generated private/public key pair to CA; with

other details to request its own digital certifcate from CA)
CA issues Identity certificate to R1
R1 and R2 validate each other by looking at signature of the digital certificate

signed by CA(they both trust).R1 and R2 can verify the signature of the CA because
they both have authenticated with CA and they both have a copy of public key of CA)

Configuration Steps to act Router as a CA
-can act as a ntp server (#ntp master 5)

//manually generate and use rsa key for CA
Server(config)#crypto key generate rsa label VPN-KEYS modulus 1024 exportable
Server(config)#crypto pki trustpoint CA
Server(ca-trustpoint)#rsakeypair VPN-KEYS
Server(ca-trustpoint)#exit

-#ip http server
-#crypto pki server CA
-#issuer-name CN=CA, O=cbtlocal
-#grant auto
-#no shutdown
show crypto pki server

Steps to enroll Router to CA to obtain a Digital Certificate,Creating a trustpoint
generate rsa key and give it a name
-#crypto pki trustpoint Trusted-CA
-#enrollment url http://5.5.5.5
-#rsakeypair r1.cbtnuggets.com
-#fqdn r1.cbtnuggets.com
-#subject-name CN=r1,O=cbtnuggets.com
-#revocation-check none

To get public key of the CA (authenticating the CA)
-#crypto pki authenticate Trusted-CA
show crypto pki trustpoints
show crypto pki certificates

To enroll to obtain digital cert
-#crypto pki enroll Trusted-CA

RSA Signature IKEv2 Authentication

Create a certificate map
 can match a few things, for example, issuer-name
Create IKE v2 proposal
 specify encryption, integrity and dh group
Create IKE v2 policy
 Use the proposal created above
Create IKE v2 profile
 need to specify Authentication methods for local and remote;identity or match certificate statement
 (optional: virtural template number must be specified here for DVTI)
Specify certificate authorities to trust

Create IPSec Transform set
 example, esp-aes esp-sha-hmac
 Mode transport
Create IPSec Profile
 set the transform set created earlier
 set the ike profile created earlier
Create a tunnel interface or virtual template interface
 Also run routing protocol is necessary






Configuration Files

Monday, 29 September 2014

VPN Profile and Policies


Connection Profile (aka Tunnel Group) controls the "Pre-logoin Policy"



After login, ASA knows who the user is and post-login policies(permissions,authorizations,restrictions,etc) come. Top always win if there is conflict.



Example flow.




Flex VPN

Flex VPN (IKEv2)

One of the advantages of IKEv2 is that we can use multiple options in the proposal while in IKEv1, we need to create mutiple proposals for this to happen.
ciscoasa(config-ikev2-policy)# encryption aes-192 aes
ciscoasa(config-ikev2-policy)# integrity sha256 sha
ciscoasa(config-ikev2-policy)# prf sha256 sha
ciscoasa(config-ikev2-policy)# group 5 2

IKEv2
 -Proposas (hagle)
   -Key Ring (keys)
 -Policy (VRF & address limits)/Restriction
 -Profile (identities, auth methods)

IPsec
 -Transforms
 -Profiles

#show crypto ikev2 proposal default
#show crypto ikev2 policy default
#show crypto ikev2 profile default
#show crypto ipsec transform-set default
#show crypto ipsec profile default

#show crypto ikev2 sa
#show crypto ipsec sa
#show crypto engine connections active

Benefits of IKEv2
 -DPD(dead peer detection), NAT traversal
 -DoS Attack Resilience (in v1, CAC is used to limit)
 -EAP, Better Sequencing
 -Same engine option IPv4/IPv6
In IKEv2, only HGE(of HAGLE) are configured in IKEv2 Proposal.
A and L are configured under IKEv2 Profile. Profile also holds Key Ring.

FlexVPN "Mode Configuration"

Added Componenets on Hub
 AAA network Authorization method list
 IKEv2 Authorization policy
 IP local pool(for demo)
 Add Author Policy to IKEv2 Profile

FlexVPN Clients

Added to Spokes:
 AAA Network Authorization method list
 ACL to ID Routes to Push to Server
 IKEv2 Authorization Policy to Call on ACL
 Add Author Policy to IKEv2 Profile
 Tunnel destination Dynamic
 Create FlexVPN "Client" config


show crypto ikev2 client flexvpn

Sunday, 28 September 2014

Dynamic Multipoint VPN (DMVPN)

Dynamic Multipoint VPN (DMVPN)

Mechanics of DMVPN
 -mGRE Tunnel Interfaces
 -Static & Dynamic IPs
 -Routing Protocol
 -Next Hop Resolution Protocol(NHRP) for Spoke discovery
 -The Hub needs a static IP but spokes do not
By default, on a tunnel interface, GRE is used.
Tunnel key, nhrp network id,nhrp authentication password,
show ip nhrp, show dmvpn (12.9 or later)
GRE Protocol number = 47

Configuration

Phase 1 - isakmp policy (HAGLE - 5 elements to negotiate with peer)
 -H = Hash (data integrity check)
 -A = Authentication (validate the peer at the other side)
 -G = Deffie Helman Group (algorithm to run between 2 devices to setup a set of shared secret key material)
 -L = Lifetime (how long this tunnel is up)
 -E = Encryption (confidentiality)

Phase 2 - IPsec transform-set

crypto isakmp policy 5
hash sha
authen pre-share
group 5
encryp aes 128
crypto isakmp key cisco123 address 0.0.0.0 0.0.0.0
crypto ipsec transform-set OURSET esp-aes esp-sha-hmac
 mode transport
crypto ipsec profile OUR_IPSec_PROFILE
 set transform-set OURSET

//On HUB
interface Tunnel0
 description DMVPN
 ip address 172.16.0.1 255.255.255.0
 no ip redirects
 ip mtu 1400
 no ip next-hop-self eigrp 777
 ip nhrp authentication cisco123
 ip nhrp map multicast dynamic
 ip nhrp network-id 1
 ip nhrp shortcut
 ip nhrp redirect
 ip tcp adjust-mss 1360
 no ip split-horizon eigrp 777
 tunnel source FastEthernet0/0
 tunnel mode gre multipoint
 tunnel key 6783
 tunnel protection ipsec profile OUR_IPSec_PROFILE
end

//On Spoke
interface Tunnel0
 description DMVPN
 ip address 172.16.0.3 255.255.255.0
 no ip redirects
 ip mtu 1400
 ip nhrp authentication cisco123
 ip nhrp map 172.16.0.1 15.0.0.1
 ip nhrp map multicast 15.0.0.1
 ip nhrp network-id 1
 ip nhrp nhs 172.16.0.1
 ip nhrp shortcut
 ip tcp adjust-mss 1360
 tunnel source FastEthernet0/0
 tunnel mode gre multipoint
 tunnel key 6783
 tunnel protection ipsec profile OUR_IPSec_PROFILE
end

DMVPN IKE Call Admission Control (CAC) - Upper limits & Clipping
 CAC Protection
  -In-negotiation limit
  -SA limit
R1#show crypto call admission statistics (look at Max IKE SAs, Max in nego:)
(config)#crypto call admission limit ike sa 2 //to set max number of sa
(config)#crypto call admission limit ike in-negotiation-sa 10 //to set max in nego


Sunday, 7 September 2014

Shares and NTFS Permissions, Offline Files, VSS, Work Folders

Share Permissions
Network Only
1st line of defense
Read, Change, Full Control
Folders only
Effective permission with multiple group membership
Deny always wins
Combine with NTFS
Administrative shares
Configuring Access-based enumeration which displays only the files & folders that a user has permissions to access.If a user does not have Read(or equivalent)permission to a folder,windows hides the folder from the user's view.


NTFS Permissions
Primary tool for access control
Files and folders
Applies locally + Remotely
Inheritance applies
 -can block parent
 -can reapply parent
Standard Permission:Full contorl,modify,R+W,R,W,list
Advanced permissions

Order of inheritance (bottom to top)
1.Explicit Deny
2.Explicit allow
3.Inherited deny
4.Inherited allow

Effective access in Advanced security settings - provide what if scenario

Offline Files
Network Shares (offline settings)
Files available when disconnected or "Work Offline"
Very good sync mechanism
Configure with "Offline settings"(caching) or GPO (Computer Cfg-Admin Templates-Network-Offline files)

Disk Quotas
Limit Disk usage
configuration
 -windows explorer
 -templates
 -soft or hard
 -drive only in explorer
 -set quota for folders in File server resource manager(FSRM) -very useful for file servers
Data Deduplication

Volume Shadow Copy
VSS Useful for
 -VM Snapshots
 -Backup operations(VSSAdmin alone is not Backup)
 -File recovery
File Recovery
 -On the fly restore
 -Schedule shadow copies
 -Not limited to shares
 -Monitor large restore jobs
VSSAdmin query reverts /For=Volume, /All
To configure, right click on the drive->configure shadow copies->Enable

Work Folders
Access to User's own work files
 -SMB/Mapped
 -Domai joined worktation
 -Non-domain joined workstation, bring your own devices(these are advantages over offline files)
Available when connected or not
Offline changes automatically synced when reconnected
Transparent conflict resolution(files will be named <name+pc name>if there is conflict)
Hub/Spoke topology
Works with file screens, classification, quotas, clustering
Grant access in setup (best with Group + fine tune with NTFS permission)
Security policies for encryption, screen lock
Can implement with existing folder redirection,offline files,home
Must be locally attached server storage
 -No DFS
 -No VNC source
1 work folder per user per device
Not collaborative (look to sharepoint, skydrive pro)

Server Basic Configuration Steps
 -Define appropriate users-->Groups
 -Add Sync server role (under Files and Storage Services)
 -Configure Role
 -DNS (create A record), Certs, Proxy

Client Configuration
 -Control panel configuration
 -Access via "work folders"
 -Can enforce with GPO (computer cfg-administrative templates-windows componenets-work folders). (user cfg-administrative templates-windows componenets-work folders)


Saturday, 6 September 2014

Configuring Local Storage


Basic Disk
 -Default Disk type, Widely compatible, Easily accessible
 -Up to 4 primary or <4 with Extended + Logical
 -No fault tolerance (apart from Raid controller)

Dynamic Disk
No Direct performance benefit
Volumes (not partitions)
Allows for Multi-Disk configurations
 -Simple
 -Spanned (2 disks or more; data faill over to 2nd disk after 1st one is full)
 -Striped (RAID-0) (data is written across all available disks; if one disk fails,remaining disk has no meaningful data on them; no failover,redudancy)
 -Mirrored (RAID-1) (
 -Stripe set with parity (RAID-5) (3 or more diks;data is written to 2 disks with parity data written to 3rd disk.If one of the first 2 disks fail,data can still be retrieved using paritial data from remaining disk and parity data on 3rd disk)
Most Admin don't use
RAID-10 not available

File Systems
FAT/FAT32/exFAT
 -No security, widely compatible
NTFS
 -Security permission,encryption or compression,auditing,quotas,file tagging,large files+Vols
ReFS (Resilient File System)
 -Even larger files,directories, volumes
 -High resiliency: error correction, verification
 -Backward compatible

Partition Types
MBR Disks
 -Traditional partition table, 2TB max
GPT Disks
 -128 partitions;
 -partition up to 8ZB
 -HD up to 18GB
Create+mount VHD, VHDX (can create VHD in Disk management,attach,online and use as a drive)

Storage Spaces (Poor Man's SAN)
SANs are very expensive + require high expertise
Win12 + Win8
Virtual Disks
 -Not VHD, VHDX (virtual hard disks)
 -Formed from storage pooll
Storage Pools
 -1 or more disks (Internal, external, various interfaces)
 -Easily extended with more unformatted disks
 -Can  be fault tolerant
 -Can be thin provisioned (starts with minimum amount needed and still can grow as necessary)

Virtual Disk (Configuration)
Storage layout
 -Simple (no redundancy)
 -2 or 3 way mirror
 -Parity
Provisioning
 -Fixed
 -Thin
Allocation
 -Data Store
 -Manual
 -Hot Spare (in the event of one hard dik failure, hot spare disk is automatically used)
Replacement + Hot spare automatically sync

Steps-> Take physical disks and create storage pool. Then create virtual disk using that storage pool

Storage Tier (hot files<frequently accessed> and cold files)