Showing posts with label Networks. Show all posts
Showing posts with label Networks. Show all posts

Wednesday, 6 June 2012

IPv6 Tunnel

Get a free IPv6 IP from a broker like http://tunnelbroker.net/

Configure the tunnel
modprobe ipv6
ip tunnel add he-ipv6 mode sit remote  local  ttl 255
ip link set he-ipv6 up
ip addr add  dev he-ipv6
ip route add ::/0 dev he-ipv6
ip -f inet6 addr


Check with ifconfig
#ifconfig he-ipv6
he-ipv6   Link encap:IPv6-in-IPv4  
          inet6 addr: fe80::2e26:a772/128 Scope:Link
          inet6 addr: 2001:470:1f08:1a7e::2/64 Scope:Global
          UP POINTOPOINT RUNNING NOARP  MTU:1480  Metric:1
          RX packets:411 errors:0 dropped:0 overruns:0 frame:0
          TX packets:251 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:488490 (477.0 KiB)  TX bytes:22616 (22.0 KiB)

Test ping
# ping6 -c2 ipv6.google.com
PING ipv6.google.com(par03s02-in-x11.1e100.net) 56 data bytes
64 bytes from par03s02-in-x11.1e100.net: icmp_seq=0 ttl=57 time=10.9 ms
64 bytes from par03s02-in-x11.1e100.net: icmp_seq=1 ttl=57 time=10.0 ms
--- ipv6.google.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 10.070/10.512/10.955/0.454 ms, pipe 2

Test website
# curl -6  -v http://sriramrajan.com/status.php
* About to connect() to sriramrajan.com port 80
*   Trying 2001:470:1f08:1a7e::2... connected
* Connected to sriramrajan.com (2001:470:1f08:1a7e::2) port 80
> GET /status.php HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: sriramrajan.com
> Accept: */*
> 
< HTTP/1.1 200 OK
< Date: Wed, 06 Jun 2012 20:34:45 GMT
< Server: Apache
< Vary: Accept-Encoding
< P3P: policyref="http://www.sriramrajan.com/p3p.xml",CP= "NON DSP COR CURa TIA"
< Content-Length: 7
< Content-Type: text/html; charset=UTF-8
ALL OK
* Connection #0 to host sriramrajan.com left intact
* Closing connection #0

#curl -I  -v  -g -k  http://[2001:470:1f08:1a7e::2]/status.php
* About to connect() to 2001:470:1f08:1a7e::2 port 80 (#0)
*   Trying 2001:470:1f08:1a7e::2... connected
* Connected to 2001:470:1f08:1a7e::2 (2001:470:1f08:1a7e::2) port 80 (#0)
> HEAD /status.php HTTP/1.1
> User-Agent: curl/7.21.7 (i386-redhat-linux-gnu) libcurl/7.21.7 NSS/3.13.3.0 zlib/1.2.5 libidn/1.22 libssh2/1.2.7
> Host: [2001:470:1f08:1a7e::2]
> Accept: */*
> 
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
< Date: Sat, 09 Jun 2012 10:35:09 GMT
Date: Sat, 09 Jun 2012 10:35:09 GMT
< Server: Apache
Server: Apache


Check SSH
# ssh -6 -p 2222 2001:470:1f08:1a7e::2
root@2001:470:1f08:1a7e::2's password: 

Firewall
Don't forget the firewall. If you use iptables for a firewall, make sure, you have equivalent setup for IPv6. You can check using
# ip6tables -nvL

Sunday, 20 May 2012

Cisco Anyconnect Errors


Anyconnect client gives this error


AnyConnect cannot confirm it is connected to your secure gateway.  The local network may not be trustworthy.  Please try another network.

After fighting it for a while, I found an answer in the release notes

http://www.cisco.com/en/US/docs/security/vpn_client/anyconnect/anyconnect25/release/notes/anyconnect25rn.html

Firefox 2.0 or later with libnss3.so installed in /usr/local/lib, /usr/local/firefox/lib, or /usr/lib. Firefox must be installed in /usr/lib or /usr/local, or there must be a symbolic link in /usr/lib or /usr/local called firefox that points to the Firefox installation directory.



So the following fixes it


mkdir /usr/local/firefox

cd /usr/local/firefox

ln -s /usr/lib64/libnss3.so 

ln -s /lib64/libplc4.so 

ln -s /lib64/libnspr4.so 

ln -s /usr/lib64/libsmime3.so 


Monday, 17 January 2011

IPv6 Part 1

Some trivia


Why 128 bit ?  - It was a compromise between a fixed 64 bit and a variable 160 bits (google OSI NSAP for more)

How many IP addresses ? - 340,282,366,920,938,463,463,374,607,431,768,211,456

What about IPv5 ? -  Used by ST - a stream protocol and not related to IP


Key Differences
  • More IPs
  • Different Header format
  • Extension support
  • Flow labeling
  • Authentication support

Header

  • Very simplified (See http://en.wikipedia.org/wiki/File:Ipv6_header.svg)
  • 20 bytes + Options in IPv4 Vs  12 fields (40 bytes) in IPv6
  • Base header no longer contains fragmentation options
  • Header no longer contains any checksum
  • Time to live (TTL) is now called Hop Limit
  • Support for traffic classes
  • Extensibility in headers. Options are not limited to the 40 bytes