How to continue the existing container after closed

You can restart an existing container after it exited and your changes are still there.

Below is how to start your last closed container:
$ docker start  `docker ps -q -l` # restart it in the background
$ docker attach `docker ps -q -l` # reattach the terminal & stdin

But if you want to start any container, you just need to issue:

$ docker start <container id> && docker attach <container id>



How to create a bootable USB drive without additional/third-party tool

# How to create a bootable USB drive without additional/third-party tool
# Prerequisite:
# USB (g:) -> disk 2 (in diskpart)
# CD Windows 7 (d:)

# run "diskpart" as administrator
select disk 2
create partition primary
format fs=ntfs quick

# run "cmd" as administrator
cd d:
cd boot
bootsect.exe /nt60 g:
xcopy d:\ g:\ /s /e /r /c /h /k /o /x /y

# Let have fun 🙂

# Note: It would work the same for Windows 8 or 10

Understanding DNS Zone…

zone "" in {
type master;
file "/etc/bind/zones/";
allow-transfer { key; };
allow-query { any; };
also-notify {;; };
notify yes;

Let’s understand each line and its meaning in the above shown zone clause inside our bind installation.

zone "": is the opening of the zone clause and it specifies the zone for which this configuration is applicable.
type master: this statement is used to specify that this server is going to be the master server for the zone, and will be authoritatively modifying the zone content.
file "/etc/bind/zones/": This statement denotes the file on our DNS server which contains the zone file and its records(we will see that file in some time).
allow-transfer {key}: This line is the most important line that is part of the security feature in bind for secure zone transfer. This line says that zone trasfer is allowed only to servers that have this key named Please note the fact that the name of this key must be same on the slave servers as well.
allow-query {any;}: This line specifies that this zone can be queried by any ip address.
also-notify {;; }: This line says that the bind server should notify these servers whenever a zone modification happens. If you see the statement, it is also-notify, means bind is will already be informing some servers about its zone modification, along with that include these servers as well(i will exaplain this a little later while making the zone file for
notify yes; is an option used to convey bind to notify slaves about the zone modification.

;zone file for domain
$TTL 300 ; zone default of 5 minutes
@ IN SOA (
2013100702 ; serial number
2h ; refresh
15m ; update retry
5w ; retry
2h ; <minimum></minimum>
IN MX 10
ns1 IN A
ns2 IN A
www IN A
apps IN A
ftp IN A

Routing – How a host routes

How a Host Routes

The default gateway is the device that routes traffic from the local network to devices on remote networks. In a home or small business environment, the default gateway is often used to connect the local network to the Internet.

If the host is sending a packet to a device on a different IP network, then the host must forward the packet through the intermediate device to the default gateway. This is because a host device does not maintain routing information, beyond the local network, to reach remote destinations. The default gateway does. The default gateway, which is most often a router, maintains a routing table. A routing table is a data file in RAM that is used to store route information about directly connected network, as well as entries of remote networks the device has learned about. A router uses the information in the routing table to determine the best path to reach those destinations.

So how does a host keep track of whether or not to forward packets to the default gateway? Hosts must maintain their own, local, routing table to ensure that network layer packets are directed to the correct destination network. The local table of the host typically contains:

  • Direct connection – This is a route to the loopback interface (
  • Local network route – The network which the host is connected to is automatically populated in the host routing table.
  • Local default route – The default route represents the route that packets must take to reach all remote network addresses. The default route is created when a default gateway address is present on the host. The default gateway address is the IP address of the network interface of the router that is connected to the local network. The default gateway address can be configured on the host manually or learned dynamically.

It is important to note that the default route, and therefore, the default gateway, is only used when a host must forward packets to a remote network. It is not required, nor even needs to be configured, if only sending packets to devices on the local network.

For example, consider a network printer/scanner. If the network printer has an IP address and subnet mask configured, then local hosts can send documents to the printer to be printed. Additionally, the printer can forward documents that have been scanned to any local hosts. As long as the printer is only used locally, a default gateway address is not required. In fact, by not configuring a default gateway address on the printer, you are effectively denying Internet access, which may be a wise security choice. No Internet access means no security risk. While devices, such as printers, may offer the capability to perform automatic updates via the Internet, it is usually easier and more secure to achieve those same updates via a local upload from a secured local host, such as a PC.


What?: Synchronous Logging & Disabling Domain Lookup

Synchronous Logging

The Cisco IOS software often sends unsolicited messages, such as a change in the state of a configured interface. Sometimes these messages occur in the middle of typing a command. The message does not affect the command, but can cause the user confusion when typing. To keep the unsolicited output separate from the typed input, the “logging synchronous” command can be entered under line configuration like line console 0 or line vty 0 4...

Disabling Domain Lookup

By default, when a host name is entered in enable mode, the router assumes that the user is attempting to telnet to a device. The router tries to resolve unknown names entered in enable mode by sending them to the DNS server. This process includes any words entered that the router does not recognize, including mistyped commands. If this capability is not wanted, the “no ip domain-lookup” command can be entered in global configuration mode to turn off this default feature.

Which ports are used by TeamViewer?

In general, TeamViewer will always work if surfing on the Internet is possible. Hence, no firewall configuration is required.

As an alternative to port 80 HTTP, port 443 HTTPs is also being checked. In addition, it is also possible to open only port 5938 TCP on the outgoing side (required for mobile connections). Data traffic should then be able to pass through on this port without any problems.


Can TeamViewer be used within a local network (LAN) only?

​You can establish Remote control sessions on your local network directly by using IP addresses or computer names. By default this feature is deactivated because software firewalls may open an acceptance dialog when configured this way.

To activate the LAN mode in TeamViewer full version and Host module:

  1. In the menu click on Extras and then on Options
  2. On the General tab activate Accept incoming LAN connections

When selecting accept exclusively it will display the IP-address of the computer in the ID-field.

A connection can now be established using the IP-address or alternatively using the host name.