Im a noob at iptables, and have recently setup a new server ans used webmin to tell iptables to allow incomming port 80, 443, and 22. However with iptables enabled the server can no longer ping external servers or do dns lookups.
What do I need to change in iptables to allow such things?
Thanks!
The rules are going to change depending on whether you have a firewall which all traffic passes through, or the firewall is on the actual machine you want to protect. I've written the rules assuming the latter.
But if you have a dedicated firewall box which protects other servers, you'd probably want
Instead of INPUT our OUTPUT.
The easiest thing to do would be to allow all outbound traffic for that server. Or you could be more specific, its up to you.
Where $myServer is whatever IP you have. Not sure about how you'd do this in webmin, sorry.
Whether you want to allow all outbound traffic, or be more specific, is up to you.
EDIT:
You may also find it useful to allow inbound ICMP (for pings), if you haven't already.
I never use Webmin to configure iptables, but check if you can add a rule:
Or,
If there's no such rule, you have to add two rules:
Ok, I figured it out.
I deleted all the rules I have and reset the firewall with a bunch of preset defaults the webmin module provided.