Forum Home
Press F1
 
Thread ID: 104682 2009-11-05 02:00:00 Opening the firewall ports on debian 5 andreas.hagen (15380) Press F1
Post ID Timestamp Content User
827231 2009-11-05 02:00:00 Hi, I did something not very smart. I configured lenny's firewall to only have port 22 open. Now I can't pass thru with tightvnc nor fax nor print. Can anyone help me to open the relevant port on the firewall.

I would still like to open ports 22, 80 I guess, ssl, &tc

Thanks in advance.

:badpc:
andreas.hagen (15380)
827232 2009-11-05 02:46:00 Did you use a tool to set it up, or did you use iptables directly?

If you just want a 'quick fix', then run the following as root (note this will open all ports, turn on packet forwarding, and won't survive a reboot. It won't touch your NAT config, if you have any.)
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -F
iptables -t mangle -F
sysctl net.ipv4.ip_forward=1
To quickly open just TCP/80 from anywhere use this:
iptables -I INPUT -p tcp --dport 80 -j ACCEPT
Erayd (23)
1