What is the right iptables rule to allow apt-get to download programs?

Posted by anthony01 on Server Fault See other posts from Server Fault or by anthony01
Published on 2012-09-29T19:18:00Z Indexed on 2012/09/29 21:39 UTC
Read the original article Hit count: 228

Filed under:
|
|

When I type something like sudo apt-get install firefox, everything work until it asks me:

After this operation, 77 MB of additional disk space will be used.
Do you want to continue [Y/n]? Y

Then error messages are displayed: Failed to fetch: <URL>

My iptables rules are as follows:

-P INPUT DROP
-P OUTPUT DROP
-P FORWARD DROP

-A INPUT -i lo -j ACCEPT
-A OUTPUT -o lo -j ACCEPT

-A INPUT -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp --sport 80 -m state --state ESTABLISHED -j ACCEPT

What should I add to allow apt-get to download updates? Thanks

© Server Fault or respective owner

Related posts about security

Related posts about iptables