{% extends "base.html" %} {% import "_macros.html" as m with context %} {% block title %}IP addresses{% endblock %} {% block content %}

IP addresses

Give a website its own address. Type the subnet from your data centre; the panel works out the rest.

{% if s.single %}
This server has one address, {{ s.main }}. Every website uses it. To give a website its own address, ask your provider for additional IP addresses, then add the subnet they send you below.
{% endif %} {% if not s.web.ok %}
{{ s.web.label }} serves every website on all addresses. To bind websites to separate addresses, switch to nginx, Angie or Apache in Web server.
{% endif %}

Add a subnet

For example 134.119.190.140/30, or one address like 134.119.190.142.

{{ m.csrf_field() }}
My provider gave other instructions
Type none when the subnet is routed to this server's main address.
{% if p %}
{{ m.csrf_field() }}
Network address
{{ p.network }}/{{ p.prefix }}
Usable addresses
{{ p.first }}{% if p.last != p.first %} to {{ p.last }}{% endif %} ({{ p.usable }})
Gateway address
{{ p.gateway or "not needed, routed to the main address" }}
Broadcast address
{{ p.broadcast or "none" }}
Network mask
{{ p.netmask }}
Interface
{{ p.iface }}

Addresses for websites

{% for a in p.addresses %} {% endfor %}
{% if p.free %}
{% else %}
There is no free address in this subnet. Ask your provider for additional IP addresses.
{% endif %}
{% endif %}

Addresses on this server

{% for a in s.addresses %} {% endfor %}
AddressWebsitesSubnetInterface
{{ a.ip }}{{ m.copy(a.ip) }}{% if a.main %}Main{% endif %}{% if not a.present %}Missing{% endif %} {% for d in a.sites[:3] %}{{ d }}{% if not loop.last %}, {% endif %}{% else %}None{% endfor %}{% if a.sites|length > 3 %} and {{ a.sites|length - 3 }} more{% endif %} {{ a.subnet or "" }}{{ a.iface }}
{% if s.subnets %}

Added subnets

{% for n in s.subnets %} {% endfor %}
SubnetGatewayMaskBroadcast
{{ n.cidr }}{{ n.gateway or "routed" }}{{ n.netmask }}{{ n.broadcast or "none" }}
{{ m.csrf_field() }}
{% endif %} {% endblock %}