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.

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.

전문가
답변함 일 년 전
  • 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
전문가
답변함 일 년 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠