3 ms·
> iptables is powerful but definitely not simple. > Maybe someday I'll learn about iptables Hmm... iptables -A INPUT -p tcp --dport 22 -j ALLOW iptab
by nknighthb 13y ago
> iptables is powerful but definitely not simple.
> Maybe someday I'll learn about iptables
Hmm...
iptables -A INPUT -p tcp --dport 22 -j ALLOW
iptables -A INPUT -p tcp --dport 80 -j ALLOW
iptables -A INPUT -p tcp --dport 443 -j ALLOW
iptables -A INPUT -p icmp -j ALLOW
iptables -A INPUT -i eth0 -j DROP
So complicated...
- vacri 13y agoI've not played with iptables much, but when I do, I'm always struck by how easy it is to read rules, yet hard to write from scratch. This being said, a simple config like this is trivially googleable.
- rlpb 13y ago> So complicated... Indeed, it is. Even if you want to cargo cult that without understanding it, you might get bitten because running those commands again will not do what you expect, since they're not idempotent. You will now reply telling me how to deal with this situation, for example if I want to now listen on a different port, or how I get FTP (or some other protocol that needs "-m state" to work. The need to do this proves that using iptables is more complicated that your example.