Skip to content

Networking

Your instances connect to private networks, and a router connects those to the outside world. Open Network in the Console menu.

The default network

New instances use the vpc network (10.10.0.0/24). Instances on the same network can talk to each other by private IP. They can reach the internet through the router. To be reachable from outside, they need a floating IP.

Floating IPs

A floating IP is a public-facing address from PublicNetwork (192.168.30.0/24) that you attach to an instance.

  1. Open Network > Floating IPs > Allocate IP and choose PublicNetwork.
  2. In the row menu choose Associate and pick the instance.

To undo it, use Disassociate to detach the address from the instance, and Release to give the address back.

A floating IP does nothing until a security group allows the traffic you want.

Security groups

A security group is a set of firewall rules applied to an instance. By default all inbound traffic is blocked and all outbound traffic is allowed.

  1. Open Network > Security Groups > Create Security Group and name it.
  2. Open the group and go to its Rules tab, then Create Rule. Choose the protocol, port and the source addresses allowed in.
  3. Apply it to an instance: in Compute > Instances, choose Manage Security Group in the instance's row menu.

For example, to allow a web server: one rule for TCP port 80, one for TCP port 443, and (if needed) one for TCP port 22 limited to your own address.

The Create Rule form:

Field Choices
Direction Ingress (traffic coming in) or Egress (traffic going out). Egress is open by default
Protocol Custom TCP Rule, Custom UDP Rule, Custom ICMP Rule (ping), All TCP, All UDP, All ICMP, All Proto or Other Protocol
Port Type Custom for one port or a range (Port/Port Range), or All Port
Remote Type CIDR plus a Remote IP Prefix such as 192.168.10.0/24, or Remote Security Group to allow traffic from every instance in another group
Ether Type IPv4 (use this) or IPv6

Remote Security Group is useful between tiers: allow port 5432 from the "web" group to the "db" group, and no addresses need to be listed.

Tip

Do not open SSH (port 22) to every address if you can avoid it. Limit it to the addresses you connect from. Example: 192.168.10.10/32 (/32 means a single address).

Port forwarding on a floating IP

One floating IP can forward different ports to different instances, which saves addresses. Open Network > Floating IPs, click the floating IP, and on its Port Forwardings tab choose Create Port Forwarding:

Field Value
Protocol TCP or UDP
External Port/Port Range The port on the floating IP, for example 2222
Internal Ip Address The instance's private address
Internal Port/Port Range The port on the instance, for example 22

A floating IP used for port forwarding cannot also be associated with an instance directly.

Ports (virtual network cards)

A port is a network card on your network. The Console creates one for each instance when you launch it, so you rarely need this page. Under Network > Ports:

  • Create Virtual Adapter makes a port with a fixed IP of your choice before any instance uses it. Launch the instance with that port (the Ports field in Create Instance), and the instance always has that address, even if you rebuild it.
  • From a port's row menu you can Attach Instance, Associate Floating IP, and Manage Security Group for that card alone.

Create your own network

  1. Open Network > Networks > Create Network and add a subnet (for example 192.168.50.0/24).
  2. Open Network > Routers > Create Router and set its External Gateway to PublicNetwork.
  3. Open the router and use Connect Subnet to attach your subnet.

The Topology page shows your networks, routers and instances as a diagram.

Note

Provider networks are admin-only. The Console creates private networks. Networks that attach directly to the physical LAN are created by administrators.

Troubleshooting

Symptom Check
Cannot SSH to the floating IP The security group allows port 22 from your address; the instance has the floating IP; the instance is Active
Instance cannot reach the internet The subnet is connected to a router that has PublicNetwork as its external gateway
Floating IP shows Active but nothing connects Contact the DiscoCloud team; this can be a problem outside your project