A developer provisions a new Alibaba Cloud Linux ECS instance for an application server and immediately configures its networking — assigning security group rules, binding an elastic network interface, and setting up public IP access so the instance is reachable and secure.
Developers use this workflow when deploying a new Alibaba Cloud Linux (Alinux) application server that requires immediate, secure external access. By combining ECS instance provisioning with granular network configuration, teams ensure the server boots with hardened security group rules, a dedicated secondary ENI for traffic isolation, and a public EIP for inbound reachability.
``bash aliyun ecs RunInstances --RegionId cn-hangzhou --InstanceType ecs.g7.large \ --ImageId aliyun_3_x64_20G_alibase_20230801.vhd --VSwitchId vsw-xxx \ --SecurityGroupId sg-default --InstanceName alinux-app-01 ``
``bash aliyun ecs CreateSecurityGroup --RegionId cn-hangzhou --VpcId vpc-xxx --SecurityGroupName app-sg aliyun ecs AuthorizeSecurityGroup --SecurityGroupId sg-xxx --IpProtocol TCP --PortRange 8080/8080 --SourceCidrIp 0.0.0.0/0 ``
``bash aliyun ecs JoinSecurityGroup --SecurityGroupId sg-xxx --InstanceId i-xxx ``
``bash aliyun ecs CreateNetworkInterface --RegionId cn-hangzhou --VSwitchId vsw-xxx --SecurityGroupId sg-xxx aliyun ecs AttachNetworkInterface --InstanceId i-xxx --NetworkInterfaceId eni-xxx ``
``bash aliyun vpc AllocateEipAddress --RegionId cn-hangzhou --InstanceChargeType PostPaid aliyun vpc AssociateEipAddress --AllocationId eip-xxx --InstanceId i-xxx --InstanceType EcsInstance ``
``bash nmcli con add type ethernet ifname eth1 con-name eni-secondary nmcli con up eni-secondary ``
``bash echo "net.core.rmem_max = 16777216" >> /etc/sysctl.conf sysctl -p ``
The ECS control plane orchestrates infrastructure provisioning (compute allocation, VPC routing, EIP binding, and hypervisor-level ENI attachment). Once virtual NICs are attached at the hypervisor layer, the Alinux guest OS assumes control, using NetworkManager for IP routing, firewalld for host-level packet filtering, and sysctl for kernel TCP stack tuning. API requests flow from the CLI → Alibaba Cloud API Gateway → ECS/VPC controllers → Guest OS via cloud-init and virtio-net drivers.
AliyunECSFullAccess, AliyunVPCFullAccess)aliyun_3_x64_20G_alibase_20230801.vhd)nmcli reload or udev rules to recognize eth1.firewalld blocks it. Run firewall-cmd --add-port=8080/tcp --permanent.cloud-init finishes overwrites DHCP configs. Verify /var/lib/cloud/instance/boot-finished exists first.