How to Create Egress-only internet gateway & DHCP option set on Amazon Web Services(AWS).
An egress-only internet gateway is a horizontally scaled, redundant, and highly available VPC component that allows outbound communication over IPv6 from instances in your VPC to the internet, and prevents the internet from initiating an IPv6 connection with your instances.
Egress-only Internet gateway works as a NAT gateway, but for IPv6 traffic. An egress-only Internet gateway is for use with IPv6 traffic only. To enable outbound-only Internet communication over IPv4, use a NAT gateway instead.
- Login to aws portal.
- Click on Services.
- Under Networking & Content Delivery select VPC.
- Click on Egress-only internet gateways.
- Click on Create egress-only internet gateway.
- Provide Egress-only internet gateway tag name.
- Select existing VPC.
- Click on Create.
- After sometime Egress-only internet gateway is ready.
DHCP option sets
DHCP is a network protocol that dynamically assigns IP addresses to instances in a VPC from the respective subnet’s CIDR block. It also passes configuration information such as domain name, Domain Name Server (DNS), NTP server, and so on. This configuration information is called a DHCP option set.
AWS recommends that you create a DHCP options set for your AWS Directory Service directory and assign the DHCP options set to the VPC that your directory is in. This allows any instances in that VPC to point to the specified domain and DNS servers to resolve their domain names.
- Click on DHCP options sets.
- Click on Create Create DHCP option set.
- Provide DHCP option set tag name.
- Provide Domain name.
- Provide DNS server ip & NTP server IP otherwise leave this field blank.
- Provide NetBios name servers & node type otherwise leave this field blank.
- click on create dhcp option set.
- After sometime DHCP option set is ready.
Create Egress-only internet gateway & DHCP options set using Shell
- Setup aws-cli on your system so click on link https://www.hackerxone.com/blog/how-install-configure-aws-cli-ubuntu-1804
- Run the following command:
To create an egress-only Internet gateway
aws ec2 create-egress-only-internet-gateway –vpc-id vpc-id
To create a set of DHCP options
aws ec2 create-dhcp-options –dhcp-configuration “Key=domain-name-servers,Values=10.0.1.1,10.0.1.2” “Key=domain-name,Values=example.com” “Key=netbios-node-type,Values=2”
Leave a Reply
You must be logged in to post a comment.