View Full Version : [SOLVED] firewall settings: unable to configure for apt-get and dns

March 29th, 2010, 01:22 AM
I have tried various rules, like opening port 53 for the DNS with little success. I finally figured that you need to set the source port to 53 and NOT the destination port.

However, I have been unable to figure out what ports apt-get requires. The only way I get it to work is to accept everything in iptables.

Anyone can give me some pointers?

March 29th, 2010, 04:23 AM
I figured it out. DNS uses both tcp and udp on port 53 and apt-get uses tcp 80.

The rules are as follows:

-A INPUT -p tcp -m tcp --sport 53 -j ACCEPT
-A INPUT -p udp -m udp --sport 53 -j ACCEPT

# apt-get
-A INPUT -p tcp --sport 80 -j ACCEPT

I hope this helps someone else in the future!