PhatBarren
03-27-2003, 10:05 PM
Hi,
I'm trying to figure out how to use iptables. There seems to be no notion of ports in the specs for it. For example, lets say I want to DROP all packets coming in on port 21. How can I do that?
What I really want to do is dis-allow everything but what I need.... internet access, SSH, and HTTP sometimes. The other thing I can't figure out is how to do that. For example, just to block everything but internet access, I would have this:
./ipchains -P INPUT DROP
./ipchains -A -p tcp -j ACCEPT
With this, I still can't get Internet access.
All help is welcome. I am especially concerned about the ports.
Thanks,
I'm trying to figure out how to use iptables. There seems to be no notion of ports in the specs for it. For example, lets say I want to DROP all packets coming in on port 21. How can I do that?
What I really want to do is dis-allow everything but what I need.... internet access, SSH, and HTTP sometimes. The other thing I can't figure out is how to do that. For example, just to block everything but internet access, I would have this:
./ipchains -P INPUT DROP
./ipchains -A -p tcp -j ACCEPT
With this, I still can't get Internet access.
All help is welcome. I am especially concerned about the ports.
Thanks,