Add an Additional IPv4 Address and Configure IPv6 on Windows Server

14 min read 2 views 0
On this page

Every JUSTG cloud server comes with one IPv4 address and free IPv6. If you have ordered an additional IPv4 through the upgrade options in the client area, or want to enable the IPv6 assigned to your VPS, Windows will not configure them for you. This guide shows how to add an additional IPv4 address and configure IPv6 on Windows Server 2016, 2019 and 2022 using the graphical interface, PowerShell New-NetIPAddress or netsh, including SkipAsSource, gateway, DNS and verification. Example addresses: primary 203.0.113.10/24 (gateway 203.0.113.1), additional 198.51.100.25/24, IPv6 2001:db8:10:20::2/64 (gateway 2001:db8:10:20::1).

Use the exact addresses, prefix lengths and gateways shown for your service in the client area (My Products & Services → your server). If the IPv6 details are not listed there, submit a ticket and we will provide them.

Step 1: Identify the network adapter and current IP configuration

Open PowerShell as Administrator. The adapter is usually called "Ethernet", but it may be "Ethernet 2" or a localized name, so check first and use your actual name in all later commands:

Get-NetAdapter
Get-NetIPConfiguration -InterfaceAlias "Ethernet"
Get-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv4 | Select-Object InterfaceAlias, Dhcp

If Dhcp shows Enabled, convert the primary address to static before adding more addresses (Step 2). If it is already Disabled, go straight to Step 3.

Step 2: Set the primary IPv4 as static (only if DHCP is on)

Mixing a DHCP address with manual extra addresses is unreliable, so set the primary IP statically with the values from the client area. Do this from the VNC console, because the network drops for a moment:

# Run in the VNC console: this briefly drops the network connection
Set-NetIPInterface -InterfaceAlias "Ethernet" -AddressFamily IPv4 -Dhcp Disabled
Remove-NetRoute -InterfaceAlias "Ethernet" -DestinationPrefix 0.0.0.0/0 -Confirm:$false -ErrorAction SilentlyContinue
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 203.0.113.10 -PrefixLength 24 -DefaultGateway 203.0.113.1
A typo in the primary IP or gateway cuts the server off the network. Double-check the values, and keep the VNC console open until you have confirmed connectivity.

Step 3: Add the additional IPv4 address with SkipAsSource

Add the extra address without a gateway; the existing default gateway is used for all IPv4 traffic. SkipAsSource tells Windows not to pick this address for outgoing connections, so your primary IP stays the source for updates, mail and API calls, while the new IP still answers incoming requests (for example a second website or SSL certificate):

# PowerShell
New-NetIPAddress -InterfaceAlias "Ethernet" -IPAddress 198.51.100.25 -PrefixLength 24 -SkipAsSource $true

# netsh alternative
netsh interface ipv4 add address "Ethernet" 198.51.100.25 255.255.255.0 skipassource=true

In the GUI: run ncpa.cpl → right-click the adapter → Properties → Internet Protocol Version 4 → Properties → Advanced → IP addresses → Add. The GUI cannot set SkipAsSource, so prefer PowerShell when outgoing source matters. If your extra IP belongs to a different subnet with its own gateway, do not add a second default gateway; contact support for the right routing.

Step 4: Configure IPv6 on Windows Server

Add the IPv6 address and its default route. Unlike the extra IPv4, IPv6 needs its own gateway:

# PowerShell
New-NetIPAddress -InterfaceAlias "Ethernet" -AddressFamily IPv6 -IPAddress 2001:db8:10:20::2 -PrefixLength 64 -DefaultGateway 2001:db8:10:20::1

# netsh alternative
netsh interface ipv6 add address "Ethernet" 2001:db8:10:20::2/64
netsh interface ipv6 add route ::/0 "Ethernet" 2001:db8:10:20::1

In the GUI, open the adapter properties → Internet Protocol Version 6 → "Use the following IPv6 address", enter the address, prefix length 64 (or the value given) and the gateway. Make sure the IPv6 checkbox in the adapter properties is ticked.

Step 5: Set IPv4 and IPv6 DNS servers

Configure resolvers for both protocols so that name lookups work over IPv6 as well:

Set-DnsClientServerAddress -InterfaceAlias "Ethernet" -ServerAddresses ("1.1.1.1","8.8.8.8","2606:4700:4700::1111","2001:4860:4860::8888")
Get-DnsClientServerAddress -InterfaceAlias "Ethernet"

Step 6: Verify with ipconfig, Test-Connection and Test-NetConnection

ipconfig /all
Get-NetIPAddress -InterfaceAlias "Ethernet" | Format-Table IPAddress, PrefixLength, SkipAsSource
Test-Connection -ComputerName 2001:4860:4860::8888 -Count 4
Test-NetConnection -ComputerName 2606:4700:4700::1111 -Port 443
Resolve-DnsName www.microsoft.com -Type AAAA

# Allow inbound ping (ICMPv4 / ICMPv6) for external testing
Enable-NetFirewallRule -Name FPS-ICMP4-ERQ-In, FPS-ICMP6-ERQ-In

All addresses should appear in ipconfig /all, the extra IPv4 with SkipAsSource True. Then test from outside, for example ping 198.51.100.25 and the IPv6 address from another machine. JUSTG's free IPv6 is also a useful fallback: on the Tokyo, Seoul, Moscow and Johannesburg networks you can publish services over IPv6 alongside your IPv4.

FAQ

Why is outgoing traffic leaving from my new IP instead of the main one?

Windows chose the new address as a source because SkipAsSource was not set (the GUI never sets it). Remove the address and add it again with the PowerShell or netsh command from Step 3.

IPv6 is configured but Test-Connection times out.

Check that the gateway and prefix length exactly match the values provided, and that the IPv6 default route exists (Get-NetRoute -AddressFamily IPv6 -DestinationPrefix ::/0). If it still fails, send us the output of ipconfig /all.

Can I get a replacement IP if my address is blocked?

If an IP is blocked by mainland China or a third party because of your own usage, it is not replaced free of charge. You can buy an additional IPv4 through the upgrade options in the client area, or connect over the free IPv6.

If the new addresses do not respond, submit a ticket to JUSTG technical support with the output of Step 1 and Step 6.

Was this answer helpful?

Related Tutorials

Windows PowerShell PS> Test-NetConnection -ComputerName 203.0.113.10…PS> nc -vz 203.0.113.10 3389PS> Get-Service -Name TermService Windows Server Remote Desktop Can't Connect to Windows Server VPS: RDP Troubleshooting Guide Fix Remote Desktop (RDP) connection failures on a Windows Server VPS: port 3389 test, firewall, NLA/CredSSP errors and the VNC console. 13 min read 1 Read tutorial Windows PowerShell PS> Get-ItemProperty -Path 'HKLM:\SYSTEM\CurrentC…PS> Get-NetTCPConnection -LocalPort 40125 -ErrorA…PS> $port = 40125 Windows Server How to Change the Remote Desktop (RDP) Port on Windows Server Change the Windows Server RDP port from 3389 with PowerShell: registry PortNumber, firewall rules, TermService restart and safe rollback. 12 min read 2 Read tutorial Windows PowerShell PS> Get-WinSystemLocalePS> Get-WinUILanguageOverridePS> Get-WinUserLanguageList Windows Server Change Windows Server Display Language, System Locale and Time Zone (2016/2019/2022) Change the Windows Server display language with Install-Language or a language pack, then set system locale, user languages and time zone. 12 min read 1 Read tutorial Windows PowerShell PS> Update-HostStorageCachePS> Get-Disk | Select-Object Number, FriendlyName…PS> Get-Partition -DiskNumber 0 | Select-Object P… Windows Server Extend C: Drive on Windows Server After a Disk Upgrade and Initialize a New Data Disk Extend the C: drive on Windows Server after a disk upgrade, fix a blocking recovery partition and initialize a new data disk with PowerShell. 12 min read 1 Read tutorial