LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-27-2002, 01:42 AM   #1
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Rep: Reputation: 47
To ping or not to ping...


In my case not a bl**dy chance of a ping!

Someone point out what obvious thing I'm missing here... I'm just setting up a router/firewall at work, and everything works lovely apart from I can't ping through the firewall. I'm using iptables, the forward policy is set to 'drop' and I've got an explicit rule to allocal ICMP through so I've got this:
Code:
$IPTABLES -P FORWARD DROP
$IPTABLES -F FORWARD
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
$IPTABLES -A FORWARD -i $INTIF -o $EXTIF -m icmp -p icmp -j ACCEPT
$IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m icmp -p icmp -j ACCEPT
<<lots more rules>>
But alas no ICMP echo requests or replys get forwarded.

Suggestions please?

cheers all

Jamie...
 
Old 08-27-2002, 01:52 AM   #2
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Original Poster
Rep: Reputation: 47
FYI...

From iptables -L -n -v just incase its any use...
Code:
Chain FORWARD (policy DROP 2 packets, 168 bytes)
 pkts bytes target     prot opt in     out     source               destination
  199 14810 ACCEPT     all  --  eth0   eth1    0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED
  191 16730 ACCEPT     all  --  eth1   eth0    0.0.0.0/0            0.0.0.0/0          state RELATED,ESTABLISHED
    0     0 ACCEPT     icmp --  eth1   eth0    0.0.0.0/0            0.0.0.0/0          icmp type 0
    0     0 ACCEPT     icmp --  eth0   eth1    0.0.0.0/0            0.0.0.0/0          icmp type 0
Jamie...
 
Old 08-27-2002, 03:32 AM   #3
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You could try deleting the "-m icmp" on the forward chain, filter outbound for "-m state --state new established related" and in for related. If you're filtering types, the type you want to allow out and back in is echo request, IIRC.

In general when TS'ing fw scripts I'd go for "catch all" logging rules, restart the script and see what's getting dropped off a chain.

HTH
 
Old 08-27-2002, 03:55 AM   #4
jharris
Senior Member
 
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243

Original Poster
Rep: Reputation: 47
Show off...

Yeah that works fine now but I don't get why as if you read the man page -m is implicitly called when you use -p. Nevermind all seems well

Cheers

Jamie...
 
Old 08-29-2002, 09:55 AM   #5
peter_robb
Senior Member
 
Registered: Feb 2002
Location: Szczecin, Poland
Distribution: Gentoo, Debian
Posts: 2,458

Rep: Reputation: 48
The --state RELATED only matches icmp error responses related to existing connections. icmp doesn't have a 'state' inside conntrack.

Regards,
Peter
 
  


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
Strange Ping Issue - Can't ping localhost but can ping others on LAN code_slinger Linux - Networking 15 03-30-2015 02:39 PM
Any idea why this time I can not ping my LAN pc but can PING for ex. www.yahoo.com vakia Debian 5 09-28-2005 06:42 PM
PPP establish can ping the gateway router but unable to ping the host deepalalla Linux - Networking 0 11-18-2004 09:10 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 ping google.com successfully,but ping client(in my intranet) failed.Why? whepin Linux - Newbie 4 12-30-2001 04:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

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