Overview
dnsmasq service running
The dnsmasq service active, dnsmasq reporting version 2.90 by Simon Kelley, and ss showing it listening on port 53 for DNS over both UDP and TCP.
dnsmasq service running
DNS round trip and forwarding
Secure by default configuration
Not an open resolver
This is a repackaged open source software product wherein additional charges apply for cloudimg support services.
Pre hardened dnsmasq by cloudimg - DNS, DHCP and TFTP in one lightweight daemon
dnsmasq is a widely deployed network infrastructure daemon that provides a caching DNS forwarder, a DHCP server, a TFTP and PXE boot server, and IPv6 router advertisement from a single small binary. This cloudimg image delivers dnsmasq fully installed, hardened, and running as a systemd service, so a secure caching name server is answering queries within minutes of launch, eliminating hours of manual package installation, configuration, and security hardening.
Why choose this image over a manual install?
Installing dnsmasq from a package repository is straightforward, but hardening it against DNS amplification abuse, disabling the operating system stub resolver, running it unprivileged, closing unnecessary ports, and validating the configuration takes real expertise and time. This image completes all of that before first boot:
- Not an open resolver out of the box: the local-service setting means dnsmasq answers only clients whose source address is on a local subnet of the instance, and silently drops every other source, blocking DNS amplification and reflection abuse with no post launch configuration
- No default credentials: dnsmasq has no login or password, so there is nothing to leak or rotate
- The operating system stub resolver is disabled so dnsmasq cleanly owns port 53 on both UDP and TCP
- DHCP and TFTP ship disabled with their ports closed in the security group, ready to enable only when you need them on a network you own
- One small daemon replaces separate BIND, DHCP, and TFTP servers for local name resolution and address assignment
How it works
dnsmasq is driven entirely by plain text configuration under /etc/dnsmasq.conf and /etc/dnsmasq.d. This image ships a documented drop in at /etc/dnsmasq.d/00-cloudimg.conf that ignores the host resolver list and forwards to explicit upstream resolvers, caches answers locally, refuses to forward unqualified names and private reverse lookups, and serves a demonstration local host record so a DNS round trip works immediately with no upstream dependency. The whole configuration lives in version controllable text and reloads with a single command.
Secure first boot
On first launch a one shot systemd service resolves the instance address, reasserts the secure configuration, verifies the configuration syntax, starts dnsmasq, and proves both the local record and upstream forwarding are answering, all before recording the endpoint details in a file only the root user can read.
Deploying on AWS
Launch the image into any VPC subnet and point your clients, your router, or your VPC DHCP options at the instance private IP for immediate DNS forwarding. The security group ships with only port 53 open on UDP and TCP for DNS, plus port 22 for administration; open the DHCP and TFTP ports only when you enable those services. Size the instance to your query volume and DHCP lease count.
Get started
- Launch the image in your target VPC subnet
- Verify DNS forwarding by querying the instance, for example dig @ example.com
- Review /etc/dnsmasq.d/00-cloudimg.conf to understand the shipped defaults
- Point your clients or router at the instance for DNS resolution
- Optionally widen the served client scope to trusted subnets, enable DHCP for your own network, or turn on TFTP and PXE boot, all documented in the paired user guide
24/7 expert support from cloudimg
cloudimg engineers provide around the clock assistance with resolver hardening, client scoping, upstream and cache tuning, DHCP scope design, TFTP and PXE boot configuration, IPv6 router advertisement, monitoring, and dnsmasq version upgrades, by email and live chat.
All product and company names are trademarks or registered trademarks of their respective holders. Use of them does not imply any affiliation with or endorsement by them.
Highlights
- dnsmasq, the lightweight all in one DNS forwarder, DHCP server and TFTP and PXE boot server, fully installed and hardened as a systemd service. One small daemon replaces separate BIND, DHCP and TFTP servers for local network name resolution and address assignment, driven entirely by plain text configuration that reloads with a single command.
- Secure by default and not an open resolver: the shipped configuration sets local service so dnsmasq answers only clients on a local subnet and drops every other source, so it cannot be abused for DNS amplification. DHCP and TFTP ship disabled with their ports closed, ready to enable for your own network, and no login or default credential exists anywhere in the image.
- 24/7 expert technical support from cloudimg. Our engineers help with resolver hardening and client scoping, upstream and caching configuration, DHCP scope design, TFTP and PXE boot setup, IPv6 router advertisement, monitoring and dnsmasq version upgrades.
Details
Introducing multi-product solutions
You can now purchase comprehensive solutions tailored to use cases and industries.
Features and programs
Financing for AWS Marketplace purchases
Pricing
Free trial
- ...
Dimension | Description | Cost/hour |
|---|---|---|
m5.large Recommended | m5.large | $0.08 |
t2.micro | t2.micro instance type | $0.04 |
t3.micro | t3.micro instance type | $0.04 |
c5a.12xlarge | c5a.12xlarge instance type | $0.24 |
c5a.16xlarge | c5a.16xlarge instance type | $0.24 |
c5a.24xlarge | c5a.24xlarge instance type | $0.24 |
c5a.2xlarge | c5a.2xlarge instance type | $0.24 |
c5a.4xlarge | c5a.4xlarge instance type | $0.24 |
c5a.8xlarge | c5a.8xlarge instance type | $0.24 |
c5a.large | c5a.large instance type | $0.08 |
Vendor refund policy
Refunds available on request.
How can we make this page better?
Legal
Vendor terms and conditions
Content disclaimer
Delivery details
64-bit (x86) Amazon Machine Image (AMI)
Amazon Machine Image (AMI)
An AMI is a virtual image that provides the information required to launch an instance. Amazon EC2 (Elastic Compute Cloud) instances are virtual servers on which you can run your applications and workloads, offering varying combinations of CPU, memory, storage, and networking resources. You can launch as many instances from as many different AMIs as you need.
Version release notes
Initial release.
Additional details
Usage instructions
Connect via SSH on port 22 as the default login user for your operating system variant (the user guide lists it per variant; the Ubuntu 24.04 variant uses ubuntu). dnsmasq has no login or password, so no credential ships in the image. Read the per instance endpoint note with: sudo cat /root/dnsmasq-aws-info.txt. Confirm the service: systemctl is-active dnsmasq.service and sudo ss -tulnp | grep ':53 '. Verify DNS: dig @127.0.0.1 ns.dnsmasq.internal returns the demonstration local record 10.0.0.53 (answered locally), and dig @127.0.0.1 example.com is forwarded to the upstream resolvers. The image is secure by default and not an open resolver: /etc/dnsmasq.d/00-cloudimg.conf sets local-service so dnsmasq answers only clients whose source address is on a local subnet of the instance and silently drops all other sources. To serve wider or different client scopes, edit that file per the user guide and run sudo systemctl restart dnsmasq. DHCP and TFTP ship disabled: to enable DHCP add an interface and a dhcp-range for a subnet you own, to enable TFTP add enable-tftp and a tftp-root, open the matching ports (67/udp for DHCP, 69/udp for TFTP) in the security group, then restart dnsmasq. Restrict the security group to your use case: allow UDP 53 and TCP 53 from the clients that will query the server and TCP 22 for administration.
Resources
Vendor resources
Support
Vendor support
cloudimg provides 24/7 technical support for this dnsmasq product by email (support@cloudimg.co.uk ) and live chat.
What we help with:
- Deployment and first boot configuration
- Hardening the caching resolver and scoping which clients it answers
- Configuring upstream resolvers and cache tuning
- Designing DHCP scopes for your own subnets
- Enabling TFTP and PXE network boot
- IPv6 router advertisement setup
- Monitoring, health checks, and alerting integration
- dnsmasq version upgrades and security patch guidance
- Performance troubleshooting
Deployment prerequisites:
- An AWS account with permission to launch EC2 instances
- A VPC with at least one subnet where the instance will serve DNS
- A security group allowing inbound UDP and TCP port 53 from your client subnets (add UDP 67 for DHCP and UDP 69 for TFTP if you enable those services)
DNS forwarding is operational within minutes of launch with no additional configuration required. For billing inquiries, subscription changes, or refund requests, contact support@cloudimg.co.uk .
AWS infrastructure support
AWS Support is a one-on-one, fast-response support channel that is staffed 24x7x365 with experienced and technical support engineers. The service helps customers of all sizes and technical abilities to successfully utilize the products and features provided by Amazon Web Services.