1. What is the HTTPs compared to HTTP ?

https is a http + Secure Socket and performs a http connection using a secure socket. This means that the contents of all communication are encrypted and transmitted. In this case, public keys are used during this time. These public keys are two pairs, one for encryption in the transmission process and the other for decoding in the reception process.

 

2. What is the approach (technique) of filtering those web-sites even for the HTTPs ?

  • IP Block

    It is a way to block the IP of the Web server itself. The method is used by the South Korean government to prevent access to the North Korea's servers.

  • DNS Blocking

    Tell the ISP the domain name and IP address of the site to block. If the request that a user attempts to access from the ISP matches the government's blocking, send warning.co.kr instead of the site's IP address.

3. propose your idea to access to those web-site avoiding government monitoring

  • Using VPN

    You can use a virtual private network (VPN) to bypass it.

  • Use of overseas DNS servers

    If you use overseas DNS servers such as Google's DNS server (8.8.8.8), you can bypass DNS blocking.

  • Remote access to abroad PCs

    After accessing a PC that is using an overseas Internet, the remote screen is transmitted and used in the same way as the RDP. Using clouds such as AWS and GCP makes it easy to obtain virtual machines that use the Internet environment abroad.

'Study > Network' 카테고리의 다른 글

DNS Query and HTTP Connection  (0) 2019.10.14
Websocket Programming  (0) 2019.09.27
TCP / UDP Socket Programming  (0) 2019.09.25

DNS Query and HTTP Connection Practice by Cisco Packet Tracer

1) Configure the Testbed.

2) Configure those servers and Client with static IP addresses

3) Configure DNS table entry

4) Set the DNS server for the client.

5) Configure the HTTP service on the HTTP server.

6) Switching to a simulation environment and Select Auto Capture Options

7) Connect to the Web from the client.

8) Web is connected by HTTP Protocol

Message

1) DNS Message

2) HTTP Message

'Study > Network' 카테고리의 다른 글

Http(https) Filter  (0) 2019.11.22
Websocket Programming  (0) 2019.09.27
TCP / UDP Socket Programming  (0) 2019.09.25

1. How to run Java scripts in a web browser

In the Chrome browser, Ctrl + Shift + I to access developer tools. You can run JavaScript directly from the Console tab.

 

2. Java script to open a web connection

1) Source

<!DOCTYPE html>
<meta charset="utf-8" />
<title>WebSocket Test</title>
<script language="javascript" type="text/javascript">

    var wsUri = "ws://echo.websocket.org/";
var output;
var loopCount = 0;

function init()
{
  output = document.getElementById("output");
  testWebSocket();
}
function testWebSocket()
{
  websocket = new WebSocket(wsUri);
  websocket.onopen = function(evt) { onOpen(evt) };
  websocket.onclose = function(evt) { onClose(evt) };
  websocket.onmessage = function(evt) { onMessage(evt) };
  websocket.onerror = function(evt) { onError(evt) };
}

function onOpen(evt)
  {
    writeToScreen("CONNECTED");
	doSend("Hello "+loopCount.toString());

  } 
function onClose(evt)
  {
    writeToScreen("DISCONNECTED");
  }

  function onMessage(evt)
  {
    writeToScreen('<span style="color: blue;">RESPONSE: ' + evt.data+'</span>');
	if (loopCount < 10)
	{
		doSend("Hello "+loopCount.toString());
		loopCount = loopCount + 1;
	}
	else
	{
	    websocket.close();
	}

  }

  function onError(evt)
  {
    writeToScreen('<span style="color: red;">ERROR:</span> ' + evt.data);
  }

  function doSend(message)
  {
    writeToScreen("SENT: " + message);
    websocket.send(message);
  }

  function writeToScreen(message)
  {
    var pre = document.createElement("p");
    pre.style.wordWrap = "break-word";
    pre.innerHTML = message;
    output.appendChild(pre);
  }
  window.addEventListener("load", init, false);
  </script>
  <h2>WebSocket Test</h2>
  <div id="output"></div>

2) Run

Live Server Plugin in Visual Studio Code opened a virtual server to create a hands-on environment.

 

3. Analyze How the WebSocket connection is built by HTTP

1) Packet Analyze

2) HTTP

(1) HTTP request message

(2) HTTP response message

3) And change protocol HTTP to Web socket

 

 

4. Send data using the WebSocket connection from a browser to a server and check data is exchanged; where is the data included ?

(1) client to server

(2) Server to client

'Study > Network' 카테고리의 다른 글

Http(https) Filter  (0) 2019.11.22
DNS Query and HTTP Connection  (0) 2019.10.14
TCP / UDP Socket Programming  (0) 2019.09.25

1. Introduction of practical environment

1) Server

Amazon Web Service EC2 t2.micro

vCPU : 1 (Intel Xeon E5-2676v3 2.40GHz)
RAM : 1GB
OS : Windows Server 2019 64bit

2) Client

DELL XPS13 9360

CPU : Intel Core i5 8250U
RAM : 8GB
OS : Windows 10 64bit

2. UDP Socket Programming in python

1) UDP Client

from socket import *

serverName = '13.209.0.157'
serverPort = 25565
clientSocket = socket(AF_INET, SOCK_DGRAM)
message = input("Input lowercase sentence:")
clientSocket.sendto(message.encode(), (serverName, serverPort))
modifiedMessage, serverAddress = clientSocket.recvfrom(2048)
print (modifiedMessage.decode())
clientSocket.close()

2) UDP Server

from socket import *

serverName = '13.209.0.157'
serverPort = 25565
clientSocket = socket(AF_INET, SOCK_DGRAM)
message = input("Input lowercase sentence:")
clientSocket.sendto(message.encode(), (serverName, serverPort))
modifiedMessage, serverAddress = clientSocket.recvfrom(2048)
print (modifiedMessage.decode())
clientSocket.close()

 

3) Practice

(1) Access virtual servers by RDP, Run the UDP Server on Python IDLE

(2) The client connects to the server through UDP

 

 

3. TCP Socket Programming in python

1) TCP Client

from socket import *

serverName = '13.209.0.157'
serverPort = 25566
clientSocket = socket(AF_INET, SOCK_STREAM)
sentence = input('Input lowercase sentence:')
clientSocket.connect((serverName, serverPort)) #Connect!!
clientSocket.send(sentence.encode())
modifiedSentence = clientSocket.recv(1024)
print ('From Server:', modifiedSentence.decode())
clientSocket.close()

2) TCP Server

from socket import *

serverPort = 25566
serverSocket = socket(AF_INET, SOCK_STREAM)
serverSocket.bind(('', serverPort))
serverSocket.listen(1)
print ('The server is ready to receive')
while True:
    connectionSocket, addr = serverSocket.accept()
    sentence = connectionSocket.recv(1024).decode()
    capitalizedSentence = sentence.upper()
    connectionSocket.send(capitalizedSentence.encode())
    connectionSocket.close()

 

3) Practice

(1) Access virtual servers by RDP, Run the TCP Server on Python IDLE

(2) The client connects to the server through TCP

 

 

 

 

4. Difference between the UDP and TCP programming

1) TCP has a connection process, but UDP does not.

2) UDP shuts down the client immediately in case of connection failure, but TCP continues to send packets until it responds.

 

 

'Study > Network' 카테고리의 다른 글

Http(https) Filter  (0) 2019.11.22
DNS Query and HTTP Connection  (0) 2019.10.14
Websocket Programming  (0) 2019.09.27

+ Recent posts