# Networking
URL: /docs/infrastructure/network
Source: https://raw.githubusercontent.com/itsektionen/docs/refs/heads/main/content/docs/infrastructure/network.mdx

How data gets to the right place

As detailed in [Servers](./servers), the chapter has two main servers in our
locale: IN-SMN and IN-ITK. IN-SMN is the primary server and runs the vast
majority of our self-hosted infrastructure and services. IN-ITK is managed by
[ITK](https://itk.gg) and is primarily used to host game servers with
[Pterodactyl](https://pterodactyl.io).

## Incoming traffic [#incoming-traffic]

The router forwards incoming traffic from the internet to IN-SMN or IN-ITK,
depending on the destination port.

HTTP(S) traffic (ports `80` and `443`) and standard SSH (port `22`), is sent to IN-SMN. 

Since most games use higher-numbered ports, ports `3000-50000` are port-forwarded to IN-ITK.
In addition, port `2222` is port-forwarded to port `22` to allow for SSH into IN-ITK.

<CalloutExt type="note">
  Since HTTP(S) traffic (ports 80 and 443) goes to IN-SMN, hosting websites on
  IN-ITK requires IN-SMN to forward it to IN-ITK using [Traefik](in-smn/traefik).
</CalloutExt>

![Traffic from the internet reaches the router. HTTP, MQTT, and SSH traffic is sent to IN-SMN; game-server traffic is sent to IN-ITK; and Traefik on IN-SMN can forward HTTP traffic to IN-ITK.](</_next/static/media/networkexample.2d7bgt94xc25a.svg>)

## External hosting [#external-hosting]

Some websites need better availability than our local servers can guarantee,
such as [kth.it](https://kth.it) and the major committee websites.
These should instead be hosted on an external hosting service, commonly
[Netlify](https://www.netlify.com/) or sometimes [Vercel](https://vercel.com).

Since the main [kth.it](https://kth.it) site ([Heim](../software/heim))
is not hosted locally on IN-SMN, there are two separate DNS records.
One record points the apex domain (`kth.it`) to Netlify
and another points the wildcard `*.kth.it` to the chapter's public IP address.

As a result, `kth.it` resolves to Netlify rather than the local router and
cannot be used to connect to the chapter servers over SSH. Use
`server.kth.it` instead.

Some subdomains of `kth.it` are also hosted on Netlify,
such as [init.kth.it](https://init.kth.it).
An easy way to find out where a domain is hosted is to simply ping the domain.
If it matches the IP for `kth.it`, it is Netlify, and if it matches `server.kth.it` it is
IN-SMN (or IN-ITK).
