In order to configure NAT rules by RRAS, I installed feature: Routing and RemoteAccess; After that, I need to configure and enable RRAS, but I don't want to use GUI, because I need to set these NAT rules automatically, so I searched that I could use"netsh routing ip nat install". At first I prepare a txt file, context is as below:
# ----------------------------------
# NAT configuration
# ----------------------------------
pushd routing ip nat
uninstall
install
set global tcptimeoutmins=1440 udptimeoutmins=1 loglevel=ERROR
# NAT configuration
# ----------------------------------
pushd routing ip nat
uninstall
install
set global tcptimeoutmins=1440 udptimeoutmins=1 loglevel=ERROR
#
#NAT Configuration For Interface Ethernet 4
#
add interface name="Ethernet 4" mode=FULL
#
#NAT Configuration For Interface Ethernet 2
#
add interface name="Ethernet 2" mode=PRIVATE
#
#NAT Configuration For Interface Internal
#
add interface name="Internal" mode=PRIVATE
popd
And then I run command like this:
sc config remoteaccess start= auto
net start remoteaccess
netsh -f C:\SNAT\config-rras-nat.txt
nothing happened. Then I decide to "netsh routing ip nat install" manually, but it shows nothing, and RRAS is not configured, still in a disable state. Why? Is there any power shell commands or netsh command to enable Routing and Remote
Access?