LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-16-2005, 11:42 PM   #1
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Rep: Reputation: 30
Ping port?


Hello.

Does anyone know what port the PING command utilises? I have iptables running to block everything except for what is specified. It's all working fine however for the life of me I can't find anywhere what port PING uses?

Thanks alot to anyone that can lend a hand

Regards
Craig
 
Old 01-16-2005, 11:46 PM   #2
zaicheke
Member
 
Registered: Apr 2004
Distribution: Slackware 10, Open BSD 3.6, Mac OS 10.3.7, Splack 10 beta
Posts: 393

Rep: Reputation: 30
Correct me if i'm wrong but i believe pings use the protocol icmp so ports don't apply to pings.
 
Old 01-16-2005, 11:50 PM   #3
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Oh ok. Thanks for your reply.

So would you know what I would need to allow to make my machine (that is firewalled) reply to ping requests?

At the moment I've basically done this...

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -A INPUT -p tcp -m multiport --dport 135,136,137,138,139,445 -j ACCEPT
iptables -A INPUT -p udp -m multiport --dport 135,136,137,138,139,445 -j ACCEPT

In the end this blocks everything, but allows port 22 (ssh), and 133-139 & 445 for samba.

However it still doesn't reply to ping

Anyone?

Thanks
Craig
 
Old 01-17-2005, 03:52 PM   #4
TheRealDeal
Member
 
Registered: Jun 2003
Location: Central Coast, NSW, Australia
Distribution: Gentoo
Posts: 438

Original Poster
Rep: Reputation: 30
Hi all.

Figured it out. This works a treat...

iptables -A INPUT -p icmp -j ACCEPT

Thanks
Craig
 
Old 01-18-2005, 11:03 AM   #5
mattdev121
LQ Newbie
 
Registered: Nov 2004
Location: Niagara Falls, Canada
Distribution: Slackware, Gentoo
Posts: 14

Rep: Reputation: 0
I could be wrong but the port that is used is port 8
At least for tcp/udp
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
dual ethernet port ping problem rani_162 Linux - Networking 2 12-11-2005 10:05 PM
how to ping a port khalifah AIX 1 06-09-2005 09:41 AM
Fedora Core 3, GRC port scan says ports arestealthed but responds to icmp ping IraB Linux - Security 7 12-09-2004 11:18 PM
Blocking PING and port 113 on SuSE and other Firewall Questions WarlockofVirgo Linux - Security 12 08-21-2004 01:28 PM
can ping but can't telnet to port 53 msweetnam Linux - Networking 4 01-26-2004 03:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration