Saturday, July 04, 2020

DNS-over-HTTPS (DoH)

What is Domain name service (DNS) ?


When we type a URL address in any internet browser like google chrome or Internet explorer, the browser translates that name to something it understands, a number, called IP Address. In Internet, all the connected devices have an unique IP address. Eg: Google website ( google.com or google.in ) has an unique IP Address, Yahoo has its own address. It is difficult to remember all these addresses, that is when DNS helps us. A server running this DNS service maintains a table to translate the Name to IP Address to make things easy for humans

Monday, January 13, 2020

Extending Multiple VLANs over trunk interface to Windows Server

Physical setup:

A Microsoft windows server with two NICs connected to a Network switch. There is a requirement to extend multiple VLANs to the server.

Steps:

Configure the network switch interfaces connected to the server as trunk ports. Trunk ports allow multiple VLANs to pass-through. Technically, All the packets passing through trunk ports must have an VlanID in the ethernet packet. the receiving switch decides where to forward the packet based on the VlanID tag. If any packet arrives without VlanID, it is considered as packet belonging to the VLAN marked as "Native VLAN". In cisco switches, "Vlan 1" is the default "Native VLAN".
Cisco Switch commands:

Friday, March 13, 2015

IPv6 Internet access from IPv4 (BSNL) DSL Connection

As of now AFAIK BSNL, the largest ISP in India, is not providing IPv6 Internet to DSL home users. So here is a cool way to connect to IPv6 Internet using a IPv4 DSL connection.

Scenario:
I have a BSNL DSL Broadband connection with dynamic IPv4 address with NAT.
Here I will demonstrate a way to access IPv6 Internet using a IPv6-over-IPv4 tunnel from tunnel broker Hurrican Electric. I am running Ubuntu Linux 14.04.

TL DR:

Signup with any IPv6 tunnel brokers in internet like Hurrican Electric or SixxS. Create a regular IPv6 tunnel. Add v4tunnel interface configuration in our computer.

Friday, October 17, 2014

Enabling developer options in Android 4.1+

Developer options like USB debugging are by default disabled in Android 4.1+ ( Android 4.2, Android 4.4.4) and the menu to enable is hidden!.

To Enable Developer Options:

  1. Go to "Settings"

Wednesday, October 15, 2014

Extract data from .dbk backup of Sony Xperia

Sometimes it happens that restoring from a .dbk backup fails (especially after flashing a custom ROM). You can extract data like contacts, messages etc from .dbk file as follows:


  1. Locate .dbk file. If you took backup using Sony PC Companion, Default backup folder is C:\Users\USERNAME\Documents\Sony\Sony PC Companion\Phone backups .
  2. Copy .dbk file to Desktop.
  3. Rename .dbk to .zip. Say Original file be XYZ.dbk , Rename to XYZ.zip
  4. Extract using any unzip softwares ( Eg: WinRAR, 7zip etc)
  5. In Extracted contents, See "Applications" Folder. Inside it, Each data type will have separate folders. To Extract contacts, Go inside "com.sonyericsson.android.contactsimport" folder and copy "fullbackupdata" file to Desktop. This is the compressed archive of all contacts.
  6. This "fullbackupdata" can be extracted using restoreData.jar . Download jar file from https://docs.google.com/file/d/0B4IK3kVRTwmtQkROa2s4aGx1VWc/edit. Keep jar file in same folder as "fullbackupdata". NOTE: If you cannot find restoreData.jar file at this link, Just Google it.
  7. Now run jar file. It will output a restore.tar file. Note: To run .jar file you should be having JAVA installed.
  8. This tar file can be extracted using any Unzip programs ( WinRAR, 7zip etc) . Inside you can find the full_backup_vcard.vcf VCard File which can be imported into phone contacts. Note: For importing to Phone, Copy this file to your sdcard. In phone, Go to Contacts -> import/export -> Import from storage

Credits

Johannes Deml and Nikolay Elenkov

Sunday, July 06, 2014

Enabling SSH and block Telnet in Cisco Routers/Switches

SSH protocol encrypts the traffic between client and server in a remote session. So for network security purpose, we should enable only SSH access to networking devices.

Before enabling SSH, make sure we configured hostname and domain name properly. This will be used to store the name of the RSA key pair generated.  All the configurations are to be done in Global config mode.

hostname Router1
ip domain name ds.myorganization.in

Change hostname and 'ds.myorganization.in' domain name to your organization domain name. Now generate the RSA keys for SSH



crypto key generate rsa

This will ask the number of bits required for modulus function. Default is 512 bits but if we want to enable SSH version 2, bits should be more than 768. So, better keep 1024 bits.