Which ports should I open for apt-get to work?
7,744
Make sure you accept also connection originated from inside. With iptables:
iptables -A INPUT -m state --state ESTABLISHED -j ACCEPT
With Webmin, allow
Connection states EQUALS Existing Connection
Related videos on Youtube
![Juan Furattini](https://i.stack.imgur.com/UoBXp.jpg?s=256&g=1)
Author by
Juan Furattini
Updated on September 18, 2022Comments
-
Juan Furattini almost 2 years
I installed Webmin, and then set up the firewall like this:
INPUT SSH port ALLOWED Webmin port ALLOWED HTTP port (80) ALLOWED DROP EVERYTHING ELSE FORWARDING no rules OUTPUT no rules
If I remove
DROP EVERYTHING ELSE
from INPUT, everything works.However, when that rule is added, apt-get doesn't work, and I can't
ping
ortraceroute
anything.Even with
DROP EVERYTHING ELSE
enabled, Webmin, HTTP and SSH still work.Which ports should I unblock to get apt-get working and allowed connecting to other domains from within the server?
Thanks
-
Admin about 9 yearsTry port 22 or 21
-
-
Juan Furattini about 9 yearsHello, this works fine.Thanks! P.S. to do this on Webmin (for anyone who finds this on Google) you need to choose "Connection states EQUALS Existing Connection"