Urgent.News

What's breaking now, across thousands of outlets.

Tech

Day 30: Hard Reset Forgets on Purpose, and NAT Needs a Guardrail Switched Off

Thirty days in, and today both tasks required deliberately switching off something that exists to protect you. Git refuses to let you overwrite shared history. EC2 refuses to forward packets that aren't addressed to it. Both refusals are correct. Both had to go. One Git task, one AWS task. Hard reset a branch and force-push it, then build a NAT instance so a private EC2 instance can reach S3. The…

Thirty days after starting, two specific tasks were tackled that required voluntarily turning off safeguards designed to protect users. Git refused to permit overwriting shared history, while EC2 would not forward packets not destined for it. Both decisions were justified as correct, and the tasks in question were to undo a branch through a hard reset followed by forcing a push, and building a NAT instance to enable a private EC2 instance to access S3.

These tasks were sourced from the KodeKloud Engineer platform. The hard reset involved rewriting history without leaving a trace, a practice generally discouraged. The process involved changing the directory, listing the current branch, displaying the commit history, resetting the branch to a specific commit, and verifying the log and status.

Resetting with the "hard" mode moved the branch pointer back and discarded any uncommitted work, with no possible undo. Pushing the changes was rejected because the branch was no longer a fast-forward, and the push was terminated. It was advised to use the "--force-with-lease" option, which checks if the remote remains unchanged and refuses if anyone has pushed updates.

The NAT instance task aimed to resolve a situation where a private EC2 instance, running a cron job to upload files to S3, was failing due to lack of internet access. The first step involved discovering that no internet gateway was attached to the VPC. Adding a NAT instance in a public subnet, and configuring the NAT instance to allow outbound internet access was the solution.

This involved installing necessary packages, modifying iptables rules to enable source/destination forwarding, and configuring the ENI (Elastic Network Interface) for routing. This NAT instance approach was cheaper than a NAT Gateway and provided a hands-on learning experience.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Week-6, 7, 8

Catching Up: Architecture, Security, and Concurrency in the Heka Auth Service Hey everyone! First of all, I want to start with a huge apology for the radio silence over the last couple of weeks.

Kanban After 12 Months Of Interrupt-Driven Work

One year after replacing sprints, our platform team kept the limits and lost the theatre. On 19 August 2025, we deleted the remaining two-week sprint from our platform board while seven tickets were…

note taking app with auto sync leetcode and local llm model integration

I built this app over the weekend as a side project. 🛠️ The problem was simple: after I submit on LeetCode, going back and forth to write notes and save them is painfully manual.

  • Daily Routine app integrates LeetCode submissions with local LLM model
  • App stores notes, keys, and database on user's machine for data security
  • Features include automatic sync, reports, heatmaps, and calendar views

I Ran 300K Company API Lookups. 40K Hit Military Bases.

security, #api, #cybersecurity, #discuss On July 30, 2026, my batch job finished 300,000 domain-to-company lookups. 39,847 of them (13.3%) resolved to defense contractors, military-adjacent parent…

  • 300,000 API lookups performed on July 30, 2026
  • 39,847 (13.3%) resolved to defense contractors or military-related companies
  • Classifier used simple string matches and geographic proximity

More from Saturday 22 August →