Created
July 5, 2016 02:12
-
-
Save arton/3712ca25c745de8e45d877b78543813f to your computer and use it in GitHub Desktop.
Create NAT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows 2012 R2のHyper-V用NAT | |
New-VMSwitch -SwitchName "Hyper-V-Switch" - SwitchType Internal | |
Get-NetIPAddress -InterfaceAlias "vEthernet (Hyper-V-Switch)" | |
IPAddress : 169.254.141.105 ……… 適当なものが振られる | |
InterfaceIndex : n ………………… 後で使う | |
InterfaceAlias : vEthernet (Hyper-V-Switch) | |
AddressFamily : IPv4 | |
Type : Unicast | |
PrefixLength : 16 | |
…… | |
New-NetIPAddress -IPAddress 192.168.0.1 -PrefixLength 24 -InterfaceIndex n | |
IPAddress : 192.168.0.1 | |
InterfaceIndex : n | |
InterfaceAlias : vEthernet (Hyper-V-Switch) | |
AddressFamily : IPv4 | |
Type : Unicast | |
…… | |
New-NeNnat -Name Hyper-V-NAT -ExternalIPInterfaceAddressPrefix 外部IPアドレス/32 | |
... InternalIPInterfaceAddressPrefixではない | |
Add-NetNatExternalAddress -Natname Hyper-V-NAT -IPAddress 外部IPアドレス | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment