Re: iptables newbie question

From: skubik (vkube_at_yahoo.com)
Date: 08/13/03


Date: Wed, 13 Aug 2003 21:17:27 GMT

On Wed, 13 Aug 2003 13:22:41 +0100, Tim Haynes wrote:
>
> You mean you're providing those services on this box?

I'm providing SSh and WWW on my box, but I use the system as my
workstation as well, so it's not a dedicated server. So those are the only
services I'm providing.

>> iptables -A INPUT -s <mail provider server> -p tcp --dport 25 -j ACCEPT
>
> I don't see that ever matching anything. Look at what you're saying:
>
> if
> it's coming into your box &&
> from your mail server &&
> protocol tcp &&
> destined for port 25
> then
> accept it
>
> I can't make out whether you should've used an OUTPUT rule and swapped -s
> to -d because you want to limit the services to which you may connect, or
> whether you're the provider controlling what stuff can come in to you.

My objective with this was only to accept packets on port 25 that are
coming from the e-mail server. I am not providing SMTP on my box, but
merely want to limit connections on that port ONLY to the e-mail server
hosting my e-mail account.

Perhaps that is the biggest problem I'm having, does the INPUT chain only
apply to anonymous outside connections made to my system, or does it also
apply to return connections made from requests on my system?
For example, on this box, if I open a browser and request yahoo.com, where
does the yahoo.com server return the information to on my system (what
port? what chain does it apply to?)

> Well, the other thing that could have been going wrong with the now-snipped
> rules is handling of return packets. If you're connecting from your box to
> a mail-server, then packets have to flow back the way as well.

Yeah, that's kinda what I mean, WHERE do those packets flow to and on what
chain?

- skubik.



Relevant Pages

  • Re: iptables newbie question
    ... > Perhaps that is the biggest problem I'm having, does the INPUT chain only ... > apply to anonymous outside connections made to my system, ... >> rules is handling of return packets. ... iptables -A NEWCHAIN -j DROP ...
    (comp.os.linux.security)
  • TCP Connections, Bluesocket, and Mac OS X
    ... concerning OSX systems and Bluesocket wireless technology. ... due to too many open network connections. ... You can see how many sessions your ... 18908 data packets ...
    (alt.internet.wireless)
  • Re: Improving FreeBSD NFS performance (esp. directory updates)
    ... >> I don't think the network is at fault, nor is the server really going ... 155645171 data packets ... discarded for bad header offset fields ... 790 connections established ...
    (freebsd-questions)
  • Re: Only some websites will open - Ubuntu
    ... incoming packets discarded ... 236 active connections openings ... 184 delayed acks sent ... TCPAbortOnSyn: 0 ...
    (comp.os.linux.misc)
  • Re: FreeBSD 7.1 tcp problem (syncache)?
    ... Completed 200 requests ... 31728 data packets ... 9740 connections closed ... segment rexmit in SACK recovery episodes ...
    (freebsd-net)

Quantcast