this post was submitted on 26 Aug 2026
726 points (99.5% liked)
Programmer Humor
32983 readers
1115 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The problem with networking is debugging it. The worst is debugging iptables and nftables. Figuring out which chain they are going to is a massive hassle. How come we don't have any graphical tools whatsoever for this work?
There's nothing to debug, it's fucking DNS again, you know it is.
And then, even when it's not DNS, it's probably DNS.
As for iptables, doesn't
-jtell you where the packets are going? Or do you mean what their destination addresses and ports are? For that, on Linux, I usessorlsof. I have never used it myself, but doesn'tufwhave some GUI?Reading the iptables dump is not for beginners. Far from it. A packet can go through all tables and chains or none. And allowing a packet in one chain then begs the questions which is the next table or chain. There are maybe 100 flags and nobody can memorise them all.
Ufw just allows adding rules,
ssdoesn't trace packages as they go through the firewall, it can show you open ports and established connections, but it can show you which tables and chains a packet went through.lsofis even more rudimentary thanssand literally means "list open files". Since everything is a file in linux, that's a lot of files. Again, no tracing.Somebody will say "just
tcpdump". Again, no that doesn't trace which tables and chains a packet goes through. The entire firewall is a blackbox totcpdump. At least to my knowledge. All it sees is which packets arrived and which were sent on the selected interfaces, and whether they was successful or not.Nothing I know of traces a packet through the firewall and presents in a TUI nor GUI. I know that it's possible to make copies of packets and send then to custom chains that can log the chain and packet it came from. There might even be a way of generating a trace by adding a rule to a chain, which means adding it to every chain, but I'm not sure I've seen something do that.
I'm struggling to think of a situation where you'd be trying to get to that level of granularity of how a single packet is flowing end-end. Can you give an example of why you want to do that?
In all my years I've never needed to do that, which is probably pretty common, which I'd guess is why there isn't an available solution for that.
My previous response to this question.
I digress. The documentation on iptables alone is an arduous read at best and requires dedication to get through and to understand. With that said, while you "cannot" (loosely said) follow any one singular packet from an iptables listing, using tcpdump will at least let you know wherefrom ~~it~~ connections originate and where they are terminating. Again, it is a hard read, not very beginner friendly, but I think it is also enough for the majority of threat models.
Question: does the person that feels that reading and understand iptables listings and tcpdumps really need to know - through an easy to read/understand UI - what chains and tables any one specific packet has traversed? What scenario/threat model/situation would that be? I'm all for discussing and widening my point of view, so don't hold back! 😊
Regarding your question, I've had trouble multiple times with docker (and other software) that required trying to find out just where a packet was getting stuck. The worst thing is when you open a port in the container to
0.0.0.0, send a request to it (HTTP, telnet, or otherwise) from the host via the container's IP and the packet doesn't arrive. Then you have to run through the gamut of:There might be other things I'm missing, but once I get to the firewall stage, most of the time I just give up, put the service into a VM and try accessing it from there - if I really really care. Otherwise, I drop it and move on.
I did just find this Network address translation part 1 – packet tracing which allows tracing a packet through the firewall via
xtables-monitor. It's in my notes now, so if I run into the problem again, I might have a place to start next time.But still, that's just on my machine. Once things happen on the network and there are routers and other things involved, it's very difficult for me to debug.
Packet Tracer?
That's a very generic name. Do you have a link?
Sure thing, here you go:
Cisco Packet Tracer
That's for simulation. I don't think it's possible to analyse a running system to find trace packets as they go through the firewall.
And it also requires a paid account to use.
You simulate your exact network setup and then run testing on that. Also I was able to download a free copy to use for free for a 3 month period if you sign up for an account on that website I linked. It was fairly convoluted and a pain to get, but I was able to download and use it.