Knowledge base · networking and Qeli

Networking basics and resources

A concise explanation of IP, subnets, routes, TUN, transports and cryptography, mapped to Qeli settings and backed by curated primary sources for further study.

Learning path

What to read and in what order

LevelOutcomeResource
1 · StartUnderstand IP, masks, gateways, LANs and portsDebian Administrator’s Handbook · networking (Russian edition)
2 · RoutesRead a routing table and configure a return pathDebian Reference · network setup
3 · SystemUnderstand Linux TUN, forwarding and firewallsLinux Kernel · TUN/TAP
4 · StandardsVerify exact protocol and primitive behaviorRFC Editor · NIST
Do not start with an RFC. An RFC is a precise implementation and verification specification, not the best first textbook. Begin with an introductory resource, then return to a standard for a specific question.
Addressing

IP addresses, subnets and CIDR

An IPv4 address is a 32-bit address assigned to a network interface. 192.168.50.34/24 combines a host address and a network-prefix length: the first 24 bits identify the network and the remaining 8 identify an address inside it.

192.168.50.34The address of one interface
/24Prefix length; equivalent to mask 255.255.255.0
192.168.50.0/24The entire subnet; in a conventional /24, host addresses are .1–.254
0.0.0.0/0Any IPv4 address; used by a default route

RFC 1918 private ranges are not routed on the public Internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Qeli pools and home LANs must be distinct and non-overlapping.

An IP belongs to an interface, while a CIDR describes a network. 10.9.0.7 is one client address; 10.9.0.0/24 is the entire VPN pool. Confusing the two expands one route to hundreds of addresses.
Layer 3

How a computer selects a route

For a destination address, the system finds the most specific match in its routing table. 192.168.50.0/24 is more specific than 0.0.0.0/0, so it wins. For equal prefix lengths, the metric and platform policy are considered.

FieldMeaning
DestinationThe IP or CIDR covered by the entry
Next hopThe router that receives the packet next
InterfaceThe physical NIC or virtual TUN used to send the packet
metricPriority among otherwise equivalent matching routes
safe route inspection on Linux
ip -br address
ip -4 route
ip route get 192.168.50.10
Communication is always bidirectional. A forward route delivers the request, but the reply needs a return path. For a LAN behind the Qeli server, the home router must know a route to pool.cidr through the server's LAN address.
Two different mechanisms

Routing and NAT are not the same thing

RoutingNAT
What it doesSelects the next path and preserves addressesChanges the source or destination address
Return pathMust be explicitly known by the networkConnection state hides the internal network
Where to use itLANs, site-to-site and managed networksPrivate-pool Internet egress or an external network you cannot change
Trade-offAll required routes must be configuredSource addresses and log transparency are lost
Rule for Qeli documentation: when both networks can be managed, show routing and the return route. Use NAT for Internet egress or identify it as a forced fallback.
From theory to configuration

How networking concepts map to Qeli

KeyRole
tun.addressAddress of the server side of the virtual network
pool.cidrVPN subnet and client address range
routeA route the server pushes to a profile or user
gatewayClient-local choice: split tunnel or a default route through Qeli
include / excludeLocal networks placed inside or outside the tunnel
client_subnetA network located behind a specific client
allowed_networksACL: destinations to which a user may send packets
routing.forward_privateAllows the server to forward packets between TUN and private networks without NAT
routing.nat.enabledSource-address translation for Internet egress; not a replacement for routes

Open the complete Qeli routing guide →

Virtual interface

TUN and a packet's path through Qeli

TUN gives a program Layer-3 IP packets; TAP gives it Layer-2 Ethernet frames. A normal Qeli tunnel uses TUN: the operating system routes a packet into the virtual interface, then Qeli reads, encrypts and sends it over TCP or UDP.

1An application creates a packet for a destination IP
2The routing table selects the Qeli TUN
3The Qeli client encrypts the packet and places it in a transport
4The server decrypts the packet and routes it onward
5The reply follows the same logical path in reverse
A transport does not replace a route. TCP/UDP carries encrypted data between client and server, but the operating system's routing table still decides which packets enter the tunnel.
Carrier transport

TCP, UDP, QUIC and ports

TermMeaningIn Qeli
TCPA reliable, ordered byte stream with retransmissionreality-tls, fake-tls, obfs, plain
UDPIndependent datagrams with no delivery or ordering guaranteeudp-fake-tls, udp-quic, udp-obfs
PortA service number within TCP or UDP; the protocol is part of the addressbind.port; TCP 443 and UDP 443 are different entry points
QUICA standardized secure transport over UDPudp-quic uses QUIC-like traffic presentation; it is not a general-purpose HTTP/3 server

Compare all Qeli transport modes →

Size and names

MTU, MSS, PMTU and DNS

MTUThe largest IP packet an interface can carry without fragmentation; a tunnel has less room because of outer headers
MSSThe maximum TCP payload in one segment; usually MTU minus IP and TCP headers
PMTUThe smallest usable MTU across the path; a wrong value often stalls large transfers
DNSThe system that maps names to IP addresses; routing acts on the resulting address
Safe Qeli starting point: use mtu = 0; for UDP keep mtu_probe = true. Server-side MSS clamping protects TCP from PMTU black holes. The Qeli DNS proxy resolves names but does not turn a domain name into a routing rule.
Channel protection

Cryptographic systems used by Qeli

PrimitivePurposeStandard
X25519Classical elliptic-curve key agreementRFC 7748
ML-KEM-768Post-quantum key-encapsulation mechanismNIST FIPS 203
ChaCha20-Poly1305AEAD: packet encryption and integrity verificationRFC 8439
Argon2idBrute-force-resistant derivation and storage of password valuesRFC 9106
TLS 1.3The standard secure channel used by reality-tls modeRFC 8446
A primitive's standard is not a product audit. RFCs and FIPS explain the algorithm; Qeli security also depends on implementation, key management, configuration, platform and threat model.
Read-only lab

Commands to start with

Linux · read-only
ip -br address
ip -4 route
ip route get 1.1.1.1
ss -lntup
tracepath 1.1.1.1
Windows · PowerShell
Get-NetIPAddress -AddressFamily IPv4
Get-NetRoute -AddressFamily IPv4
Test-NetConnection vpn.example.com -Port 443
Read the result in order: interface address → matching route → next hop → port reachability → Qeli log. A tcpdump capture is useful later, but it can contain sensitive addresses and unencrypted local packets.
Curated library

Textbooks, guides and standards

For a Qeli server, current Debian Reference and Debian Manpages take priority. The Russian Debian 11 Administrator’s Handbook is useful for fundamentals; general sources remain for protocol concepts and diagnostics on other client platforms.

Primary sources

Where to verify the Qeli 0.8.1 implementation