Showing posts with label DNS. Show all posts
Showing posts with label DNS. Show all posts

Tuesday, May 20, 2025

How To Hosting Google Sites on own Domain

Create your website at Google Sites - sites.google.com
When finished design, Publish first. The website is now working on sites.google.com.

To connect this website with your domain name which you purchased from a Domain Registrar, do the following:
On the webpage on sites.google.com/, click on the Settings (Gear) icon
On the Settings dialog, click Custom Domains, then click Connect Domain.


Type in the domain that you own already.
It will check the validity of the domain. If ok, proceed to next step.


If you see this message "This domain is not verified. Please verify your ownership", then click on the link, otherwise skip this section.


This section will prove to Google you own the domain, by creating an extra TXT/CNAME record.
A new dialog will show two options: Domain or URL Prefix
Select the Domain option.


On the dialog: Verify domain ownership via DNS record.
1. Select record type. TXT or CNAME. I choose CNAME because my domain registrar only has this option.
2. Sign in to your domain registrar (e.g. CrazyDomains)
3. Copy the CNAME record below into the DNS configuration. 
i) CName Label/Host: asuiasiaafa
ii)CName Destination / Target: aoanofzdof.googlehosted.com
These two values (masked above) will be given by Google.
4.Press verify below.

Reminder: steps  2 and 3 must be performed on the Domain Registrars page, before coming back here to click Verify. By placing the above information on your Domain Registrar, this shows you have control of the domain name, hence proving to Google that you own that domain.



Follow the instructions below to complete the procedure.

Google Sites will show these instructions:
################
Connect to third-party domain registrar
- In a separate tab, sign in to your domain registrar’s website
- Go to your DNS settings
- Create a new CNAME entry
- Under CNAME value or alias, enter www
- In CNAME destination, enter ghs.googlehosted.com
- Note: Your domain registrar might require a full stop at the end
- Save changes
- Come back to this tab and click Done
################

The next section shows the steps for CrazyDomains as the domain registrar. Others may be similar.



Saturday, March 20, 2021

Help - Ping request could not find host ... DNS problem

 You may have seen this message before:

Ping request could not find host www.cnn.com. Please check the name and try again.

There could be many things that can go wrong with the networking that caused this. Ultimately it is very likely the DNS that is the problem.

Firstly, let's simply go through a few troubleshooting options - just to rule out it is not because of the them. Do one step at a time, check the WiFi and if it works, don't need to progress to the next step.

1. For older laptops, believe it or not, there is actually a slider switch to click the WiFi on or off. Check this if you have it.

2. On Windows, on the TaskBar, ensure that the Wifi (not any particular Wifi network yet) itself is turn on. The WiFi can be either On or Off or Flight Mode or something else.

3. Check that the Wifi is connected to a particular WiFi network. Make sure it says Connected and Secured. And there is no yellow exclamation mark.

4. Open up CMD command terminal, type:

ipconfig  /release 

ipconfig /renew

ipconfig /flushdns

5. Reboot the computer.

If all else does not work, it is now time to suspect the DNS.

The DNS, in layman's term (you can Google for the exact definition), is directory service that lookup the URL you type and translate to an IP address. Its like a Post Office that receives an address and then go to that address. Our computer need to have the address of the DNS server itself - eg. we need the POST OFFICE's address, so that we can give them our letter.

The so somehow, our computer needs to know which DNS IP address to use. Most of the time, this is hidden from the user, that is why most computer user don't have to deal with it and so don't understand it. It can be automatically set on the modem or router, and also optionally automatically set on the Windows network settings.

So why should there be a problem when the DNS working nicely behind the scenes one day, then the internet is not working the next day? There could be many answers, but a recent experience has shown that some software, including VPN software can go it to the network settings and change the DNS address.

Hence one more solution to above error message is to change the DNS address on the Windows networking level. Whichever Windows version you have, 

- find your own way to the 'Network Connections' page or 'Change Adapter Settings' and you can see a page with a list of your network (ethernet, Wifi, VPN) adapters. 

- Right click on the Wifi adapter, if you are using the Wifi adapter.

- Choose 'Internet Protocol Version 4', and click on the Properties

- Go to the section called 'Use the following DNS server addresses', and add 'Preferred DNS' and 'Alternative DNS'


Some of the free DNS addresses are:

Quad9 - known for security

9.9.9.9, 149.112.112.112 (Secured)

9.9.9.10, 149.112.112.10 (Unsecured)

Google - you know them

8.8.8.8, 8.8.4.4

Cloudfare - known for speed

1.1.1.2, 1.0.0.2

OpenDNS - mature and known for security, 

208.67.222.222, 208.67.220.220

CleanBrowsing - known for parental filtering

185.228.168.168, 185.228.169.168

Thursday, October 17, 2013

Notes Networking


Contents
========
inetd
socket.h
Setup Linux Network
Network VM with Virtual Box - Bridged, Internal, Host-Only


inetd
========
inetd - maintains passive sockets on a variety of these well-known ports. When a new connection is created, Inetd starts a program to handle the connection, based upon a configuration table. This way, one program can handle incoming connections for a variety of services. Inetd only runs server programs as they are needed, and will spawn multiple server programs to service multiple network connections. Inetd works best for network services with fairly long duration, so the extra startup overhead becomes negligible.

inetd services - echo, discard, daytime, chargen, time
- Usage: eg. telnet <IP> echo


socket.h
=========
#include <sys/socket.h>
int     accept(int socket, struct sockaddr *address, socklen_t *address_len);
int     bind(int socket, const struct sockaddr *address, socklen_t address_len);
int     connect(int socket, const struct sockaddr *address, socklen_t address_len);
int     getpeername(int socket, struct sockaddr *address, socklen_t *address_len);
int     getsockname(int socket, struct sockaddr *address, socklen_t *address_len);
int     getsockopt(int socket, int level, int option_name, void *option_value, socklen_t *option_len);
int     listen(int socket, int backlog);
ssize_t recv(int socket, void *buffer, size_t length, int flags);
ssize_t recvfrom(int socket, void *buffer, size_t length, int flags, struct sockaddr *address, socklen_t *address_len);
ssize_t recvmsg(int socket, struct msghdr *message, int flags);
ssize_t send(int socket, const void *message, size_t length, int flags);
ssize_t sendmsg(int socket, const struct msghdr *message, int flags);
ssize_t sendto(int socket, const void *message, size_t length, int flags, const struct sockaddr *dest_addr, socklen_t dest_len);
int     setsockopt(int socket, int level, int option_name, const void *option_value, socklen_t option_len);
int     shutdown(int socket, int how);
int     socket(int domain, int type, int protocol);
int     socketpair(int domain, int type, int protocol, int socket_vector[2]);


Setup Linux Network
===================
Based on Fedora 5 exprience

Setup DNS
1. add DNS IP address to file: /etc/resolv.conf; OR
2. Use GUI to enter primary, secondary DNS

Restart Network
1. Reboot; OR
2. /etc/init.d/network restart

Setup Static Routing
- for PC with external IP to connect to a Local network
1. Create a file called /etc/sysconfig/network-scripts/route-eth0
2. Enter this in the file:
      192.168.0.0/16 via 129.78.77.253
   ... where first IP range in internal network and last IP is gateway
Alternatively,  
3. Create a file called /etc/sysconfig/static-route
4. Enter this in the file:
      any net 192.168.0.0/16 gw 129.78.77.253
     
Remove Microsoft IP range
1. Edit file /etc/sysconfig/network, and put:
     NOZEROCONF=1
2. Edit files /etc/sysconfig/network-scripts/ifcfg_eth<0|1|2|...>, put:
     NOZEROCONF=1

Check Kernel IP Table:
    netstat -nr
   
Add route manually,
route add -net 192.168.0.0/16 gw 129.78.77.253 eth0
 

Remove Microsoft Routing




Network VM with Virtual Box - Bridged, Internal, Host-Only
===========================================================

This section covers the three types of networking options between Linux Guest VMs in Virtual Box, in relation to a Windows host.

I. Bridged Networking
Use Case: The Windows host (eg 192.168.1.7) and the Linux VM (eg 192.168.1.9) have independent IP, but are both belong to the same subnet network. In the usual case where the network is dynamic and the DCHP server, assigns an IP to the Windows host, it will also assign an IP to the Linux VM. Like the Windows host, the Linux VM can also connect to the outside world.

Windows Host setup: Nothing to do, if the Windows host is already connected, ie can browse the internet or ping and external IP. To check the network details, type:
   ipconfig /all
Look for the sections, either:
   i) Wireless LAN adapter Wi-Fi:
  Description ...... Qualcomm Atheros.....
   ii) Ethernet Adapter ethernet:
  Description ...... Qualcomm Atheros ....
Since there are many adapters, you need to look for the sections, using description, that relates to the physical adapters installed on your PC / laptop. The adaptes could be LAN ethernet or Wi-Fi, and the Description gives a clue if they are physical or virtual adapters.

Pick the correct physical adapter and note down the following:
IPv4 address:    eg      192.168.1.7
Subnet Mask:     usually 255.255.255.0
Default Gateway: usually 192.168.1.1

Linux Guest VM setup:
In the Virtual Box, VM settings -
- Enable Network Adapter - Check
- Attached to - Bridged Adapter
- Name: Choose your physical adapter (see Windows Host Setup above). Usually it is "... Wireless Adapter ..." or "... Ethernet Controller ..."
- Promiscuous Mode = Deny,
- Mac Address: (Write this down for later use)  eg. ...1D:9A
- Cable Conneceted - Check

Start the Linux VM,
- determine if it is eth0 or eth1 by: ifconfig -a
  WARNING: By default, configuration exist for eth0 only. But VB requires eth1,2,3,4
  So Copy the config file:
       cd /etc/sysconfig/network-scripts
       cp ifcfg-eth0 ifcfg-eth1
- edit /etc/sysconfig/network-scripts/eth1
    DEVICE = eth1   (change this as necessary)
    HWADDR=  enter the MAC address from the VM settings section above
    TYPE=Ethernet
    ....
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=dhcp
- re-activate the interface:
   ifdown eth1
   ifup eth1
   /etc/init.d/network restart
- check by looking at: ifconfig -a
  the results for eth1 are: IP=192.168.1.9, Bcast 192.168.1.255, Mask 255.255.255.0



II. Internal Networking
Use Case: Two or more Linux VMs (eg 192.168.56.110 and 192.168.56.115) are required to communicate with each other, hence the same subnet 192.168.56.x. They are not connected to the outside world and do not communicate with the Windows host (192.168.1.7).

Windows Host setup: Nothing to setup.
Do the following only after the Linux setup is complete, and then come back to Windows to verify the following:
To check the network details, type:
   ipconfig /all
Look for the section:
  Ethernet adapter VirtualBox Host-Only Network:
  Description: VirtualBox Host-Only Ethernet Adapter.
  Physical Address: eg ... 8C:D9. Not needed to be the same from the Linux VM settings below.
  ....
  IPv4 address:    eg      192.168.56.1
  Subnet Mask:     usually 255.255.255.0

Linux Guest VM setup:
In this section, we will setup up the VM above (VM1) and a new VM (VM2) where VM1 uses eth2 to communicate with VM2 which uses eth0. The VM1 uses eth2 because its eth1 is already involved with Bridged networking.

In the Virtual Box, VM settings for both VM1 (Adapter 2 tab) and VM2 (Adapter 1 tab)
- Enable Network Adapter - Check
- Attached to - Internal Network
- Name: intnet
- Promiscuous Mode = Deny, Allow All
- Mac Address: (Write this down for later use)  ( 9F:4B,   ...77:84)
- Cable Conneceted - Check

Start the Linux VM1,
- determine if it is eth0 or eth1 by: ifconfig -a
  WARNING: By default, configuration exist for eth0 only. But VB requires eth1,2,3,4
  Since VM1 has already eth1 for bridged, the eth2 adapter will be used here.
- edit /etc/sysconfig/network-scripts/eth2
    IPADDR=192.168.56.105
    NETMASK=255.255.255.0
    DEVICE = eth2   (change this as necessary)
    HWADDR=  enter the MAC address from the VM settings section above, eg. 9F:4B
    TYPE=Ethernet
    ....
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=static  
- re-activate the interface:
   ifdown eth2
   ifup eth2
   /etc/init.d/network restart
- check by looking at: ifconfig -a
  the results for eth1 are: IP=192.168.56.105, Bcast 192.168.56.255, Mask 255.255.255.0
- add the lines to /etc/hosts
  192.168.56.105  VM1-host  VM1-host.domain
  192.168.56.115  VM2-host  VM2-host.domain
- add the lines to /etc/sysconfig/network
  NETWORKING=yes
  HOSTNAME=VM1-host.domain

Start the Linux VM2,
- determine if it is eth0 or eth1 by: ifconfig -a
  WARNING: By default, configuration exist for eth0 only. But VB requires eth1,2,3,4
- edit /etc/sysconfig/network-scripts/eth0
    IPADDR=192.168.56.115
    NETMASK=255.255.255.0
    GATEWAY=192.168.56.100
    DEVICE = eth0   (change this as necessary)
    HWADDR=  enter the MAC address from the VM settings section above, eg. 77:84
    TYPE=Ethernet
    ....
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=static  
- re-activate the interface:
   ifdown eth0
   ifup eth0
   /etc/init.d/network restart
- check by looking at: ifconfig -a
  the results for eth0 are: IP=192.168.56.115, Bcast 192.168.56.255, Mask 255.255.255.0
- add the lines to /etc/hosts
  192.168.56.105  VM1-host  VM1-host.domain
  192.168.56.115  VM2-host  VM2-host.domain
- add the lines to /etc/sysconfig/network
  NETWORKING=yes
  HOSTNAME=VM2-host.domain
 


III. Host-Only Networking
Use Case: This has features of both Bridged and Internal Networking. The Windows host is connected to the Linux VM (VM1) so that they can communicate (able to ping) with each other (like Bridged network). However the VM1 is not connected to the outside world (like internal network).
The VM1 may see the Windows host as a HOST - hence the name Host only. So the VM1 may not be able to interact with the Windows host like a peer node, but it is able to access it, such as accessing a License server on the Windows Host.

Windows Host setup: This will be using the SECOND VirtualBox Host-Only adapter because the First Host-Only Adapter has been used by the Internal networking above. Do the following only after the Linux setup is complete, and then come back to Windows to verify the following:
To check the network details, type:
   ipconfig /all
Look for the section:
  Ethernet adapter VirtualBox Host-Only Network #2:
  Description: VirtualBox Host-Only Ethernet Adapter #2.
  Physical Address: eg ... 74:F0.
  ....
  IPv4 address:    eg      192.168.39.1
  Subnet Mask:     usually 255.255.255.0

Linux Guest VM setup:
For VM1, since adapter 1 is used for Bridged, adapter 2 is used for Internal, so the adapter 3 will be used here for Host-Only networking
In the Virtual Box, VM settings for Adapter 3 -
- Enable Network Adapter - Check
- Attached to - Host-Only Adapter
- Name: VirtualBox Host-Only Ethernet Adapter #2
- Promiscuous Mode = Deny,
- Mac Address: (Write this down for later use)   eg.  ... 4A:C6
- Cable Conneceted - Check

Start the Linux VM,
- determine if it is eth0 or eth1 by: ifconfig -a
  WARNING: By default, configuration exist for eth0 only. But VB requires eth1,2,3,4
  So Copy the config file:
       cd /etc/sysconfig/network-scripts
       cp ifcfg-eth1 ifcfg-eth3
- edit /etc/sysconfig/network-scripts/eth13
    DEVICE = eth3   (change this as necessary)
    HWADDR=  enter the MAC address from the VM settings section above
    TYPE=Ethernet
    ....
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=dhcp
- re-activate the interface:
   ifdown eth1
   ifup eth1
   /etc/init.d/network restart
- check by looking at: ifconfig -a
  the results for eth1 are: IP=192.168.39.201, Bcast 192.168.39.255, Mask 255.255.255.0
- add the lines to /etc/hosts
  192.168.39.201  VM1-host  VM1-host.domain
- add the lines to /etc/sysconfig/network
  NETWORKING=yes
  HOSTNAME=VM1-host.domain
  GATEWAY=192.168.39.1

Saturday, August 11, 2012

How To Point Your Blogger - Blogspot Blog to Your Own Domain Name


The following steps show you how to connect your existing blog to your own domain name.

Why do this?
- You have a blog about BLAH already, at www.blah.blogspot.com or blah.blogspot.com
Notice the "blogspot" word which seems rather messy.
- So you actually want something like:
www.blah.com    or www.blah.org
..... then read on ......

What you need?
- You already have established a blog with Blogger, also called Blogspot.com
- You need to buy / register a Domain Name.
- Having a Domain Name is not enough, you also need to get DNS services from the Domain Name seller. This is an extra charge.

What is DNS Services?
- When you see things like "CNAME" or "MX records" or "C records", you are on the right track.
- From the CrazyDomains website, DNS services allow you to:
"Modify the zone files for your DNS information assigned to your domain. Update and add A records, CNAME or MX records."
- In simple terms, it lets you point your www.blah.com website to the actual blog at blah.blogspot.com. When people go to the www.blah.com, they will see your blog.

How to do it?
1. Ensure all the requirements above are met.
2. Get login DNS settings page for the domain.
3. Edit the domain settings to add a record:
   Fully Qualified Domain Name: www
   Record Type:CNAME
   Record Value: ghs.google.com
4. Go to Blogspot.com and login.
5. Go to "Settings", then "Basic", then "Publishing".
6. Below the "Blog Address", click the link "Add a Custom Domain".
7. Click "Switch to Advanced Settings".
8. Follow the instructions on the screen to complete.

Others
http://kb.weebly.com/domain-settings.html#arecord
The link above talks about MX, A-Records, CNames and how they are used when the Hosting And Domain provider are different. Very useful in setting up new domains or new web hosting different to domains.

Thursday, March 04, 2010

How to Secure your Computer

The following list various methods and software*** that can be applied to secure your computer.

1.Use a Firewall - see Firewall Testing (Hardening)
Software: Comodo Firewall, Zone Alarm
To configure firewall, it is useful to know the port numbers of common services. This can be found from IANA in:
www.iana.org/assignments/port-numbers
Your own IP address can also be discovered using: http://whatismyipaddress.com


2. Use Anti-Virus software
Software: Avast, Avira, AVG
Testing of antivirus software can be performed using the following tools:
- EICAR - www.eicar.org/anti_virus_test_file.htm - Provides a standardized test file for signature based virus detection software.
- Spycar - www.spycar.org - Spycar is a suite of tools designed to mimic spyware-like behavior, but in a benign form.

3. Use Anti-Spyware
Software:  Spybot Search and Destroy, SuperAntiSpyware

4. DNS Routing and protection - setup your DNS to be routed over a DNS provider with filtering and protection.
OpenDNS

5. Use a password manager to manage multiple passwords
Software: KeePass
Testing passwords can be accomplished using these tools:
SecurityStats - http://securitystats.com/tools/password.php

6. Browser Plugin Protection
Software: Web of Trust, McAfee Site Advisor

7. Encrypt your files on your computer.
Software: TrueCrypt

8. Securing your websites.
Using SSL: How to implement SSL in IIS
Testing Tools:
Goolag Scanner (www.goolag.org) provides one more tool for web site owners to patch up their online properties. It is powered by Google to help see if your sites are vulnerable to a hacking attempt. By typing in a domain name it may return site vulnerabilities. The tool makes “it easy for unskilled users to track down vulnerabilities and sensitive information on specific Web sites or broad Web domains.” The tool uses the Google Custom Search engine and has a detailed specification (http://www.goolag.org/specifications.html) on how it works.


9. Disable Autorun to prevent attack from infected USB or other removable drives.

Click the Start button, then Run and enter “gpedit.msc” without the quotes
Go to Computer Configuration -> Administrative Templates -> System
Scroll down to “Turn off Autoplay” and double click on it
Click on the “Enabled” radio button, then for “Turn off Autoplay on” select “All drives”

10. Use portable Linux which runs entirely from the CD or DVD without accessing the hard drive. The distributions are:

Google Chrome OS - developed by Google. Intended to run on Netbook and allow user to interact with web applications. The standalone DVD is available to use as a standalone OS without installation

Lightweight Portable Security (LSP) - developed by the USA's Department of Defence, is a small Linux live CD focusing on privacy and security, for  this reason, it boots from a CD and executes from RAM, providing a web browser, a file manager and some interesing tools. LPS-Public turns an untrusted system into a trusted network client.

11. Check various alert service websites:
Stay Smart Online

12. How to Lock Down Linux - short article with a few basic essentials to secure Linux.

*** This article, writer and blog does not recommend the use of the software above and is not liable for anything. The list of software is represents the authors personal opinions.

13. To check suspicious behaviour, there is a range of tools, collectively called Sysinternals, which is now available from Microsoft. Here is a presentation on how to use Sysinternals by its creator Mark Russinovich, entitled:
Malware Hunting with the Sysinternals Tools
Date: June 12, 2012 from 3:15PM to 4:30PM

14. Security on USB.

Ghost USB honeypot (http://www.honeynet.org/node/871)
This is currently a research project to identify malware on a PC that tries to infect any connected USB. Here is a description from its website.
----------------
"Ghost is a honeypot for malware that uses USB storage devices for propagation. It is able to capture such malware without any further knowledge - especially, it doesn't need signatures or the like to accomplish its task.
Detection is achieved by emulating a USB flash drive on Windows systems and observing the emulated device. The assumption is that on an infected machine the malware will eventually copy itself to the removable device."

15. Social Network
For Facebook and Twitter and perhaps some other social networking sites, there are profile scanners available to scan links, newsfeeds, messages, such as the free one from Eset https://socialmediascanner.eset.com/.