"SmittyBroham" <(E-Mail Removed)> said:
>I have a very simple firewall ruleset on a single interface which
>should only be blocking everything inbound except to ports 22, 80, and
>90.
....
>The problem is, with these exact rules above loaded, I am unable to
>send any outbound traffic save for ICMP. For example, I can ping our
>mail server, but I can not 'telnet mail.server.com 110', it just hangs.
> I would like to allow all outbound traffic from our server with no
>restrictions.
....
>These same symptoms are present on an entirely different virtual server
>we manage as well, so I must be missing something fundamental. Anyone
>know what it is?
Well, for this you already got your reply. You blocked any return packets
that might be coming. So, when you connect somewhere, whatever you see
as coming from the other host will arrive in return packets, and you
blocked these.
Then to the reason why your "ping" worked, even though telnet to the
same destination didn't: your firewall was leaking. You had instructed
your firewall to block all incoming TCP packets -- leaving a gaping hole
for anything non-TCP to just walk in and say "Hello!". UDP, ICMP,
just whatever, but TCP was blocked.
To improve, you could pretty much drop the DROP rule, and instead
use a DROP policy on the INPUT chain. Works the same, but you don't
have to worry about possibly appending rules beyond the "terminal"
DROP rule - as with policy, the DROP is what the packet faces after
all the INPUT rules have been processed.
Then to tell how you could've got at least some indication to the
problem you had: by using "iptables -vL" instead of "iptables -L"
and looking at the packet counters of your DROP rule. You'd have
seen the number of dropped packets increase at each connection
attempt. By placing a LOG rule before the DROP you might have
been able to correlate these packets to the tests you were
making.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
|