Re: Preventing uploads on a specific port to internet.
From: Kasper Dupont (kasperd@daimi.au.dk)Date: 06/18/02
- Next message: Sundial Services: "Sample collections of ipchains rules?"
- Previous message: Robert Lomitola: "ipchains and ntp udp port 123"
- In reply to: Michael Burnem: "Re: Preventing uploads on a specific port to internet."
- Next in thread: Michael Burnem: "Re: Preventing uploads on a specific port to internet."
- Reply: Michael Burnem: "Re: Preventing uploads on a specific port to internet."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Kasper Dupont <kasperd@daimi.au.dk> Date: Tue, 18 Jun 2002 16:26:26 +0200
Michael Burnem wrote:
>
> "Kasper Dupont" <kasperd@daimi.au.dk> wrote in message
> news:3D0E3043.D5DE9C52@daimi.au.dk...
> > Michael Burnem wrote:
> > >
> > > I need a simple iptables rule to prevent uploads through port 2000, but
> > > downloads still has to be possible.
> > > I figure i should just make a --sport -j drop rule in PREROUTING
> > > But that didn't work out too well..
> >
> > You must be more specific. Are you configuring server or client?
> > Are you talking about port 2000 on server or client? What
> > protocol are you using?
>
> The protocol is tcp.
Of course it is tcp, but there are a large number of file
transfering protocols using tcp. Which one are you using.
> I've configured my router to route all --dport 2000 packages to 192.168.0.1
> on my network, so i can get a active connection.
> But now i want to limit upload's on that port, but not downloads.
If the ports are exactly the same there is little you can
do on the tcp level. You should do it on a higher level
and setup the server knowing the protocol to do what you
want. Of course you could break the tcp connection after
some number of bytes on the upstream, but you would need
to know how large a download request could be, and it is
still not an advisable solution.
>
> I've limited upload on ppp0(to limit modem queues, since i've got adsl)
> Do you know how to use tc handle on the ppp0 interface(so i could limit
> upload's on port 2000), on the eth0 interface it's easy, but that only goes
> for downloads.
> (Sorry, i've really not gotten the logic of iproute2)
There does exist some QoS mechanisms that can match
packets with rules similar to iptables and put them in
different queues for transmision. But I don't know the
details.
Do you want to prevent uploads or just to keep the rate
of packets low? In the later case you would probably
want to just keep the transmission window in one
direction small.
-- Kasper Dupont -- der bruger for meget tid på usenet. For sending spam use mailto:razor-report@daimi.au.dk
- Next message: Sundial Services: "Sample collections of ipchains rules?"
- Previous message: Robert Lomitola: "ipchains and ntp udp port 123"
- In reply to: Michael Burnem: "Re: Preventing uploads on a specific port to internet."
- Next in thread: Michael Burnem: "Re: Preventing uploads on a specific port to internet."
- Reply: Michael Burnem: "Re: Preventing uploads on a specific port to internet."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|