Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello, im new in the linux world, and i want to know how to filtrate trafic for the tcp ports. if posible in the text mode, and in the x mode. thanx for advanced.
a good way is also to use iptables. Here is an example on how to block access to port 6000 (the X11 port)
#iptables -A INPUT -p tcp --dport 6000 -j REJECT
#iptables -A INPUT -p udp --dport 6000 -j REJECT
REJECT will send back an icmp message, the default is port unreachable i think, if you exchange REJECT with DROP then they wont get anything back and it will seem as if the computer isnt up at all, atleast based on trying to connect to that port. REJECT is a way of saying "hey bug off".
There are many more things you can do with iptables and i suggest that anyone wanting to secure their machine learn iptables.
also, iptables is for the text mode. you can even do a script file and have it run everytime the computer starts (there is no iptables.conf or anything like that....if there is, i havent found it yet). I put mind in a file called firewall.sh, and i added a line to rc.local..
sh /root/firewall.sh
and my firewall rules get set everytime the machine reboots.
Last edited by Robert0380; 05-18-2003 at 02:15 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.