LinuxQuestions.org
Help answer threads with 0 replies.
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 07-11-2006, 09:20 PM   #1
Evil Otto
LQ Newbie
 
Registered: Jul 2006
Posts: 8

Rep: Reputation: 0
Question Can't ping external hosts from firewall


Hi all. Apologies if this is a FAQ.

Typical 2-nic firewall setup:

eth0 is the Internet-facing interface, getting an IP via DHCP from my cable modem.
eth1 is the local-facing interface, routing to 192.168.1.0/24.

The firewall can ping 192.168.1.x hosts.
The 192.168.1.x hosts can ping both eth1 and eth0.
The 192.168.1.x hosts can ping Internet hosts.
The 192.168.1.x hosts have full Internet access.

HOWEVER.

The firewall itself cannot ping Internet hosts. Observe:

[zach@<obfuscated> ~]$ sudo ping -I eth0 <yahoo>
Password:
PING <yahoo> (209.73.186.238) from 24.218.42.122 eth0: 56(84) bytes of data.

--- <yahoo> ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 3999ms


[zach@<obfuscated> ~]$ sudo ping -I eth1 <yahoo>
PING <yahoo> (209.73.186.238) from 192.168.1.254 eth1: 56(84) bytes of data.
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted
ping: sendmsg: Operation not permitted

--- <yahoo> ping statistics ---
3 packets transmitted, 0 received, 100% packet loss, time 2001ms

(Replace <yahoo> with the expected address, first post and I can't post a URL.)

While there's no pressing NEED for me to be able to ping internet hosts from my firewall (since everything else works) it would be useful for troubleshooting purposes, when my cablemodem decides to crap itself. I'm sure I just need to add a rule to my INPUT chain (possibly to FORWARD as well?) but I am having a hardtime figuring it out. Relatively new to iptables.

TIA for any help or suggestions
 
Old 07-11-2006, 09:37 PM   #2
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,173

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
I believe that the firestarter program uses iptables and is very easy to configure. You could install it and then set it to allow ping through.
 
Old 07-12-2006, 12:18 AM   #3
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
Hey, I think you should look into the settings for iptables where the ICMP protocol is accepted if the state is Established. You probably tried to keep from being pinged, but was a tad bit overzealous.

I used to have a firewall that I did on my own and here is the ping rules I had in there:

Code:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
iptables -A INPUT -p icmp -m state --state ESTABLISHED,RELATED -j ACCEPT
 
  


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
I can't really figure out why these two hosts can ping each other Berkut83 Linux - Networking 19 03-17-2006 03:17 PM
External Hosts Resolve but Local Hosts Do Not kjm9 Linux - Networking 7 11-19-2005 03:51 PM
dhcp client can't ping gateway but can ping other local hosts dirty_forks Linux - Networking 7 10-08-2004 10:54 AM
Cannot ping internet hosts nikhiljosh Linux - General 3 12-10-2003 09:43 AM
RH 7.2 - Can't ping other hosts spato Linux - Networking 8 05-04-2002 05:19 PM

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

All times are GMT -5. The time now is 06:24 AM.

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