Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to deny my Internet connection's download properties for all ports. I mean I want to only allow upload. Is it possible?

share|improve this question
please clarify what you're trying to accomplish. do you have some server on your network that you're trying to make "upload-only"? are you trying to restrict other users on your network? are you trying to restrict all outgoing traffic while allowing incoming traffic? your question as stated now doesn't make much sense. – quack quixote Mar 20 '10 at 23:54
At least you should specify what operating system or networking device are you configuring. – Vi. Mar 21 '10 at 0:32
If you're talking from purely networking terms, you have to be careful -- upload/download is really just egress/ingress...and both directions are required to perform a TCP handshake. Completely blocking one direction or the other will break all connectivity using TCP connections. – Nextraztus Mar 22 '10 at 16:39

iptables -I OUTPUT -m conntrack --ctstate NEW -j REJECT?

It will block all outgoing connections in Linux.

iptables -A INPUT -m quota --quota 2000000 -j ACCEPT
iptables -A INPUT -j REJECT

It will setup "download" quota to 2000000 bytes. Note that uploads will also slightly decrease the counter.

share|improve this answer
hi quack and Vi. clearly, i want to share my internet connection on my network and users can make only upload to everywhere on my network. if i have to use server or app for this, i can use. my preference is windows about OS. thank you for interest. – Kerberos Mar 21 '10 at 0:34
so i want to block download everyhere at the same time. – Kerberos Mar 21 '10 at 0:35
What do you mean by "upload" and "download"? FTP uploads? BitTorrent? There are many protocols with upload capability. Do you want to block only big downloads (like movies) or any of them? Is IRC/Jabber/ICQ message retrieval considered "download" and message sending considered "upload"? How securely do you want to block "downloads"? – Vi. Mar 21 '10 at 2:08
@Kerberos: blocking all "incoming" traffic would block transmissions necessary for proper operation of "outgoing" traffic (eg, ACK packets and the like). – quack quixote Mar 22 '10 at 15:56
@Kerberos: You probably want to setup quotas for upload and download, e.g, user may send packets to internet, but receive only 1 megabyte of packets per hour. But if user attempts to download something big, the quota will be exhausted, and user will lost capability of both downloading and uploading. Each dowload has a bit of upload, and each upload has a bit of upload. If you fully close the one direction, you will not be able to upload or download at all. – Vi. Mar 22 '10 at 16:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.