Skip to content

Inbounds

An inbound is a door that clients connect through: a WireGuard or AmneziaWG server on its own UDP port and its own subnet. Each one is a network interface named aftab followed by a number, such as aftab0. A client gets one config for each inbound it may use, so a second inbound gives you a second way in: another port, another protocol, or another way out to the internet. The installer made the first one, named WireGuard, and you can add more at any time.

  1. Open Inbounds and press Add inbound.
  2. Choose the Protocol. WireGuard (Standard) is the fastest and works with the WireGuard app, but filtering recognises it easily. AmneziaWG disguises the handshake and needs an AmneziaWG app (see below).
  3. Give it a Remark, a name for your own use.
  4. Check Port (UDP). The panel suggests the first free port from 51820 up, and the dice button picks a random one. Each inbound needs a port of its own.
  5. Press Create. Then open that UDP port in your provider’s firewall. If the server runs ufw or firewalld, AFTAB opens it there for you.

Every other field has a working default.

Field What it does
Clients connect to The address put in configs: this server, or a bridge in Iran. See Iran bridges.
Route Where the traffic leaves: this server, or an exit with up to 4 backup exits. See Exits.
Iranian sites skip the VPN The split tunnel. See Routing and split tunnel.
Keep clients off private networks and each other Clients cannot reach the provider’s internal network, other private networks or one another. A new inbound starts with it on when Selling and operator tools is on, and off otherwise.
Server address (CIDR) The server’s address and the subnet clients get addresses from: an IPv4 subnet with a prefix length from 16 to 29 bits, such as 10.8.0.1/24.
DNS servers The servers the panel’s resolver asks for your clients. See DNS.
Advanced The rest, folded away: MTU, Keepalive (seconds), Client allowed IPs, Endpoint host, Port range (optional) and Usage rate.

Under Advanced, the default MTU is 1232, which keeps uploads fast on Iran’s home and mobile lines and fits a QUIC Initial. Keepalive is 25 seconds by default and keeps the connection open behind NAT. Client allowed IPs 0.0.0.0/0 sends everything through the VPN, and the tunnel carries IPv4 only. Endpoint host replaces the public address in this inbound’s configs, for example with a domain. Port range (optional) gives each config its own port from a range such as 20000-30000, at most 20000 ports, so that no single port can be throttled for everyone: open the whole range in the firewall too. A range runs from 1024 to 65535 and cannot include 15353 or 40801 to 41054, which AFTAB keeps for itself. Usage rate says how much of the traffic counts toward clients’ limits: 1 is all, 0.5 is half, 0 is none.

AmneziaWG is WireGuard with junk packets and disguised headers, so filtering cannot recognise it. The WireGuard app does not open an AmneziaWG config: clients need an AmneziaWG app.

  • 2.0: recommended is the default version. It needs AmneziaVPN 4.8.12.9 or newer, or the AmneziaWG app 2.0 or newer. Version 1.0 works with every AmneziaWG app, old ones and routers included. Version 3.1 hides the most and needs the newest apps.
  • Medium is the default strength and suits almost everyone. Heavier hides more and costs a little speed.
  • AmneziaWG must be installed on this server. A normal install already runs it (via aftab extras install) unless you used AFTAB_SMALL=1. If the form says it is not, press Install AmneziaWG or run sudo aftab awg install (or sudo aftab extras install). It takes a few minutes, and you can save the inbound first: it starts when the install ends. The automatic install handles Debian and Ubuntu; on Fedora and RHEL it stops and prints the dnf commands to run. sudo aftab awg status shows what is installed. If the kernel module cannot be built but the userspace engine amneziawg-go is there, the panel uses it: the same, a little slower.
  • If an AmneziaWG inbound seems to be detected, edit it, open Obfuscation values and press New values. Every client of that inbound must then import its config again.

Open the row’s menu and choose Edit inbound. What a change does to the configs clients already have:

  • A new protocol, new AmneziaWG values, a new port or a new port range makes the configs already handed out stop working. The panel says how many clients are affected. A subscription link shows the new config by itself; anyone who imported a file or a QR code must import it again.
  • A new bridge or endpoint address is used by new configs. Older ones keep working through the old address.
  • A changed split tunnel leaves older configs working, but they send all traffic through the VPN.
  • The subnet cannot change while the inbound has clients.

The switch in the row turns the inbound off and on. Reset traffic sets the usage of the inbound and of every client that uses it back to zero, so think before you press it.

An inbound that has clients cannot be deleted, because they would lose their configs. Choose Move clients and pick another inbound. The clients keep their usage, limits and subscription link, and import their config again, because the new inbound has another server key and address. The same window can tell the clients that were moved, in Telegram. When the last client has moved, the inbound can be deleted.

  • “Port N is used by the inbound …”. A UDP port can serve only one inbound or bridge tunnel, and port ranges must not overlap. The panel offers a free one.
  • “This subnet overlaps …”. Two inbounds cannot share addresses, and AFTAB keeps a few 10.x ranges for its own tunnels. The panel names the range and offers another.
  • Clients cannot connect. The UDP port is closed at the provider’s firewall, or the inbound is turned off. Open the client’s Details and press Why can’t they connect?. See Clients and plans.
  • Blocked from Iran, as a tag on the inbound: the bridges’ tests from Iran got no answer from it. Try another port, an AmneziaWG inbound, or a bridge. The tag appears only while a bridge is connected.
  • An “MTU” tag. The MTU plus the packet overhead is over 1500 bytes, which some networks drop. Lower the MTU to 1200.