LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-22-2006, 12:10 PM   #1
mad_mike018
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Rep: Reputation: 0
Question Cannot Ping Linux Root Server


Hi all,

First of all, a big hello to you all because I am new to the forums!

I currently have a root server from fasthosts and I cannot seem to ping my IP Address. The server is there and running as I can join the gameserver that is on it. I know this has something to do with IP Tables but I have tried everything I can think of or recommended to do via various tutorials.

I was wondering if you could take a look at my firewall file and tell me where I am going wrong because I am almost going blind by looking at it as I have been looking at it for hours lol.

Below is my firewall file from /etc/sysconfig (thanks so much in advance for any help!)

Regards
Mike

P.S I have tried changing # Drop ICMP echo request messages sent to multicast or broadcast addresses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts from 1 to 0 but this made no difference.

Also when checking /proc/sys/net/ipv4/*.* all files are 0 bytes?

Code:
#!/bin/sh

#fix for passive ftp connection tracking
/sbin/modprobe ip_conntrack_ftp

# Drop ICMP echo request messages sent to multicast or broadcast addresses
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts

# Drop source routed packets
echo 0 > /proc/sys/net/ipv4/conf/all/accept_source_route

# Enable TCP SYS cookie (DoS) protection
echo 1 > /proc/sys/net/ipv4/tcp_syncookies

# Don't accept ICMP redirect messages
echo 0 > /proc/sys/net/ipv4/conf/all/accept_redirects

# Don't send ICMP redirect messages
echo 0 > /proc/sys/net/ipv4/conf/all/send_redirects

# Enable source address spoofing protection
echo 1 > /proc/sys/net/ipv4/conf/all/rp_filter

# Log packets with crazy source addresses
#echo 1 > /proc/sys/net/ipv4/conf/all/log_martians

# Flush all chains
/sbin/iptables --flush

# Allow all loopback traffic
/sbin/iptables -A INPUT  -i lo -j ACCEPT
/sbin/iptables -A OUTPUT -o lo -j ACCEPT

# Set default policies to drop all traffic
/sbin/iptables --policy INPUT   DROP
#/sbin/iptables --policy OUTPUT  DROP
/sbin/iptables --policy FORWARD DROP

# Allow previously initiated and accepted exchanges to bypass rule checking 
# Allow all outbound traffic
/sbin/iptables -A INPUT  -m state --state ESTABLISHED,RELATED	 -j ACCEPT
/sbin/iptables -A OUTPUT -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT

# PING 
/sbin/iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT

# Allow incoming port 22 (ssh) traffic
/sbin/iptables -A INPUT -p tcp --dport 22 -m state --state NEW -j ACCEPT

# Allow incoming port 80 and 443 (http/s) traffic
/sbin/iptables -A INPUT -p tcp --dport 80  -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 443 -m state --state NEW -j ACCEPT

# Allow incoming port 53 (udp/tcp) dns traffic
/sbin/iptables -A INPUT -p udp --dport 53 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 53 -m state --state NEW -j ACCEPT

/sbin/iptables -A INPUT -p udp --dport 69 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 69 -m state --state NEW -j ACCEPT


# Allow incoming port 25 (tcp) SMTP traffic
/sbin/iptables -A INPUT -p tcp --dport 25 -m state --state NEW -j ACCEPT

# Allow incoming port 110 (tcp) POP3 traffic
/sbin/iptables -A INPUT -p tcp --dport 110 -m state --state NEW -j ACCEPT

# Allow incoming port 123 (udp) NTP traffic
/sbin/iptables -A INPUT -p udp --dport 123 -m state --state NEW -j ACCEPT

# Allow incoming ports 20 and 21 (tcp) FTP traffic
/sbin/iptables -A INPUT -p tcp --dport 20 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 21 -m state --state NEW -j ACCEPT

# Allow incoming port 3306 (udp/tcp) MySQL traffic
/sbin/iptables -A INPUT -p tcp --dport 3306 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 3306 -m state --state NEW -j ACCEPT

# Allow incoming port 5555 (tcp) MatrixSA traffic
/sbin/iptables -A INPUT -p tcp --dport 5555 -m state --state NEW -j ACCEPT

# Allow incoming port 8002/9001 (tcp) traffic for initial listeners
/sbin/iptables -A INPUT -p tcp --dport 8002 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 9001 -m state --state NEW -j ACCEPT

# Teamspeak
/sbin/iptables -A INPUT -p tcp --dport 14534 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 51234 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 8767 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 8768 -m state --state NEW -j ACCEPT

# SQL Server
/sbin/iptables -A INPUT -p tcp --dport 1433 -m state --state NEW -j ACCEPT

# COD2
/sbin/iptables -A INPUT -p udp --dport 20500 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 20510 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 28960 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 28960 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 20600 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 20610 -m state --state NEW -j ACCEPT

# GAMESPY
/sbin/iptables -A INPUT -p tcp --dport 13139 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 13139 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 27900 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 27900 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 28900 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 28900 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 29900 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 29900 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 29901 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 29901 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 6500 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 6500 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 6515 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 6515 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 3783 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 3783 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p tcp --dport 6667 -m state --state NEW -j ACCEPT
/sbin/iptables -A INPUT -p udp --dport 6667 -m state --state NEW -j ACCEPT

# Drop all other inbound traffic
/sbin/iptables -A INPUT -j DROP

# Save these rules so they are initiated when iptables is started
/sbin/service iptables save
 
Old 03-22-2006, 12:32 PM   #2
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
Quote:
Originally Posted by mad_mike018
...I currently have a root server from fasthosts and I cannot seem to ping my IP Address....
Are you certain that ICMP isn't being firewalled upstream from your system (by the provider)?
 
Old 03-22-2006, 12:45 PM   #3
mad_mike018
LQ Newbie
 
Registered: Mar 2006
Posts: 2

Original Poster
Rep: Reputation: 0
Great, just got this from tech support:-

Thank you for your email.

Unfortunatley it is not possible for anyone to ping our servers. This is because of repeated Denial of Service attacks attempted on our systems. You should however find the hostname will resolve to an IP Address.

If you have any further issues, please email us.


Well thats just great... Im trying to use MySQL administrator from my local PC and it wont connect because it cant ping or see the server :S
 
Old 03-22-2006, 12:53 PM   #4
Darin
Senior Member
 
Registered: Jan 2003
Location: Portland, OR USA
Distribution: Slackware, SLAX, Gentoo, RH/Fedora
Posts: 1,024

Rep: Reputation: 45
It's possible that the provider has a default deny policy. If this is the case you would need to specify in a request any ports you need access to, including whatever port SQL administration is done on. There are many production systems that have ICMP (Pings) blocked that are still accessable for whatever services are required (try to ping microsoft.com, doesn't mean their site is down.) If MySQL requires a ping to succeed in order to connect, I'm quite sure it is an option that can be turned off.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can not ping linux server gb1 Linux - Networking 4 02-06-2008 05:15 AM
windows 98 m/c ping to ip address of red hat server but fails to ping hostname ravilohot Linux - Networking 2 09-07-2004 04:57 AM
I can only ping linux server over vpn bearcatzack Linux - Networking 0 01-28-2004 02:05 PM
no ping replies from linux server kags Linux - Networking 5 09-21-2003 09:03 AM
Help: Can't ping my linux server ben282 Linux - Networking 3 11-01-2001 08:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:55 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