Using an EC2 instance as a remote DHCP server

0

Hello, I need to solve this problem for my bachelor thesis. I want to run ubuntu ami on EC2 and use it as a remote DHCP server. This has to be within the free tier so I can't use elastic IPs and also NAT. I'm running Ubuntu 22.04 LTS with public IPv4 assigned and an access security group configured. Should I use EC2 public IPv4 address as default gateway when configuring DHCP? In theory it should work with the configured ip helper address from the remote router (my local router). Do I need to worry about AWS because they only route unicast? If you have any advice I will be grateful. Thank you very much for any answers.

已提问 1 年前793 查看次数
2 回答
1

You can use an Elastic IP if you want, as it's free to have one associated with your instance. You're only charged for >1 on an instance or for ones that are unassociated.

专家
已回答 1 年前
  • I didn't know that. I assigned public IP within creation of instance. Also, I'll be using only 1 instance so I will not use that elastic IP's potential. Or is there any advantage by using that elastic IP?

  • The purpose of an Elastic IP is to get a public IP address that doesn't change on instance restart. If you're relying on the instance having a specific IP because something else is referring to it, then use an Elastic IP.

0

When you configure the DHCP server on your EC2 instance, you can use the EC2 instance's public IPv4 address as the default gateway. This should work with the configured IP helper address from your local router.

note 1 : such configurations are not recommended

note 2: You do not need to worry about AWS only routing unicast, as DHCP requests and responses are unicast messages.

profile picture
专家
已回答 1 年前
  • I know it's not recommended, but in my case it must be free so i cant use any utility to secure that connection, I can use only security group to set some rules, for example inbound/outbound rule only for my local router's public IP.

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则