Linux - Security This 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
07-01-2004, 04:55 AM
|
#1
|
Member
Registered: Jul 2001
Location: Kent, UK
Distribution: /Fedora/Debian/Ubuntu/Xubuntu
Posts: 108
Rep:
|
block telnet to port 80
Hi,
How can I block telnet to port 80.
I read the post how to block telnet to port 25 but it doesnt actually say how.
I have turned off telnet and I have a iptables firewall that allows port 80 in.
The Firewall has a explicit deny all at the end.
This does not stop telnet connections to ports 80 or any other port allowed through the firewall.
I guess there must be a way to examine traffic at a protocol level
so traffic with destination port 80 with telnet protocol is denied.
So, can anyone tell me how to do this with iptables?
Cheers.
Neil.
|
|
|
07-01-2004, 05:56 AM
|
#2
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
switching off telnet services will not stop telnet connects to port 80 or port 25.
You can use telnet to connect to any open port ( a port that is listening ) that is ready to accept connections.
So, if you have apache or any other http server listening on port 80, it will also respond to telnet attempts ... although, it will not give a login prompt.
|
|
|
07-01-2004, 06:00 AM
|
#3
|
Member
Registered: Jul 2001
Location: Kent, UK
Distribution: /Fedora/Debian/Ubuntu/Xubuntu
Posts: 108
Original Poster
Rep:
|
Yes I know,
But can I get iptables to filter on protocol?
The reason I ask is because somebody tried an exploit on my webserver by telnetting to port 80 and issueing commands. They were unsuccessful and have been reported to their ISP.
Cheers,
|
|
|
07-01-2004, 06:07 AM
|
#4
|
Member
Registered: Nov 2002
Distribution: Debian testing.
Posts: 143
Rep:
|
iptables -A INPUT -p TCP -s 0/0 --dport 23 -s 0/0 -j DROP
|
|
|
07-01-2004, 06:23 AM
|
#5
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
you may use the string search feature in iptables... read somewhere that this feature is not available with 2.6 kernels ... correct me if I am wrong
http://www.lowth.com/howto/iptables-treasures.php
|
|
|
All times are GMT -5. The time now is 12:32 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|