<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Network on Simon&#39;s Blog</title>
    <link>https://blog.simon-hu.org/tags/network/</link>
    <description>Recent content in Network on Simon&#39;s Blog</description>
    <image>
      <title>Simon&#39;s Blog</title>
      <url>https://blog.simon-hu.org/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.simon-hu.org/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.148.1</generator>
    <language>en</language>
    <lastBuildDate>Wed, 08 Nov 2023 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://blog.simon-hu.org/tags/network/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Browser CORS policy</title>
      <link>https://blog.simon-hu.org/posts/2023/11---november/2023-11-08-browser-cors-policy-and-csrf-attack/</link>
      <pubDate>Wed, 08 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://blog.simon-hu.org/posts/2023/11---november/2023-11-08-browser-cors-policy-and-csrf-attack/</guid>
      <description>&lt;h2 id=&#34;intuition&#34;&gt;Intuition&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;To begin with we need to answer a simple question, why do we need to block traffic from one site to another site, and have everything controlled in this CORS policy ?&lt;/strong&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Imagine there&amp;rsquo;s two site, site A is a legitimate banking website that provides online finance services, site B is a phishing website that tries to spoof the website A. As a developer you might be aware of API&amp;rsquo;s, and the legitimate banking website is using exactly that to transfer money from account to account, for instance: &amp;ldquo;&lt;code&gt;https://bank-site-a.com/api?from=account1&amp;amp;to=account2&lt;/code&gt;&amp;rdquo;. If without any security policy, the phishing site B can copy this exact link and place it on some easily found buttons or links, and once a user (with logged in bank account) clicks on these buttons or links, the transaction will be triggered without the user&amp;rsquo;s permission.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How does Mail works with DNS MX records</title>
      <link>https://blog.simon-hu.org/posts/2023/11---november/2023-11-01-mail-server-and-dns-mx-record/</link>
      <pubDate>Wed, 01 Nov 2023 00:00:00 +0000</pubDate>
      <guid>https://blog.simon-hu.org/posts/2023/11---november/2023-11-01-mail-server-and-dns-mx-record/</guid>
      <description>&lt;h2 id=&#34;breakdown-of-the-email-address&#34;&gt;Breakdown of the email address&lt;/h2&gt;
&lt;p&gt;In general a email address is in formatted as &lt;code&gt;username @ domain.com&lt;/code&gt;, we can break it down into:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Address after the &lt;code&gt;@&lt;/code&gt; sign, here &lt;code&gt;domain.com&lt;/code&gt;, this is the domain of the target mail server, your server will check MX records of this domain from the DNS server, and sends the email to the corresponding IP of the domain.&lt;/li&gt;
&lt;li&gt;Address before the &lt;code&gt;@&lt;/code&gt; sign, here &lt;code&gt;username&lt;/code&gt;, is where the mail receiving server will put your emails at. In a classical mail (receiver) server, each user will have a unique folder, once a user ges a email from somebody on the internet, his/her email will get stored into this folder, here imagine there&amp;rsquo;s a &lt;code&gt;\username&lt;/code&gt; folder where all the &lt;code&gt;.eml&lt;/code&gt; files will be located at.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;sending-email-with-help-of-dns-system&#34;&gt;Sending email with help of DNS system&lt;/h2&gt;
&lt;p&gt;Email server is distinctive from the DNS system, in order for the email to work, the DNS system must be working. As the DNS system is the one that translates the domain name to the IP address, and the IP address is the one that is used by the email server to send and receive emails.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
