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 Risposte
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.

ESPERTO
con risposta un anno fa
  • 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
ESPERTO
con risposta un anno fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande