Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
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.
ineed to drop the gtalk port for an specific i.p. in my network, i googled for it.. i got it this
Block Access To Outgoing IP TCP / UDP Port Number
It is also possible to block specific port numbers. For example, you can block tcp port # 5050 as follows:
iptables -A OUTPUT -p tcp –dport 5050 -j DROP
To block tcp port # 5050 for an IP address 192.168.1.2 only, enter:
iptables -A OUTPUT -p tcp -d 192.168.1.2 –dport 5050 -j DROP
but when i entre in to my confir
/etc/sysconfig/iptables/
its showng the error
[root@localhost ~]# vim /etc/sysconfig/iptables
[root@localhost ~]# service iptables restart
Flushing firewall rules: [ OK ]
Setting chains to policy ACCEPT: filter nat [ OK ]
Unloading iptables modules: [ OK ]
Applying iptables firewall rules: iptables-restore v1.3.5: multiple -d flags not allowed
Error occurred at line: 14
Try `iptables-restore -h' or 'iptables-restore --help' for more information.
pls help me to sort out this...
iptables -A OUTPUT -p tcp --dport 5050 -j DROP
iptables -A OUTPUT -p tcp -d 192.168.1.2 --dport 5050 -j DROP
Notice the double minus "--" signs on "--dport" option. The simple usual rule with most commands is that single letter options are preceded by single minus "-a -b -c" or equivalent "-abc" and multi-letters options are preceded by double minus "--something --otherthing". Your "-dport" options was interpreted as "-d -p -o -r -t" options by iptables command.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.