How to change hostname on a AWS Storage Gateway?

Using the gateway local console, a static hostname can be set manually or can be acquired dynamically using DHCP or rDNS.

In this article, I will show the steps to configure a static hostname for the file gateway from the gateway local console, creating an A record in the DNS to resolve to this static hostname. Also, mapping and using an AD SMB file share using this static hostname. 

To set the static hostname, connect to the gateway VM/EC2 local console. After connecting to the gateway local console, select option 2 : Network Configuration as in the below screenshot.

storage gateway vm console

In next section under Network Configuration, select option 3: Configure Hostname. Then, under Select hostname acquisition mode, choose 1: Static and provide the static hostname, as fgw.corp.example.com below. Next, select y under Apply configuration and press enter, further press x to save the network changes and restart the gateway.

For the static hostname to be available and resolvable in the network, next step is to create a DNS A host record pointing the gateway IP address to the static hostname. Login to your DNS server, open DNS manager, go to your domain, Forward Lookup Zones. Under there, create an A record pointing the static hostname fgw.corp.example.com to gateway EC2 instance IP address 172.31.5.233

After above steps, using the option 4: View Hostname Configuration, you can verify and confirm hostname configuration is setup correctly on the gateway. You can verify the DNS resolution doing a ping to the static hostname as below.

You can use the static hostname of the gateway and map and use the SMB AD file share as shown below. Configuring the hostname on the gateway would be required for using SPN (server principal name) with Kerberos AD authentication. Check this article for setting up SPN and using Kerberos with file gateway.

Let us know if you have any questions/feedback in the comments.

Leave a Comment

Your email address will not be published. Required fields are marked *