LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 03-13-2010, 11:30 PM   #1
myubuntu
LQ Newbie
 
Registered: Feb 2010
Posts: 23
Blog Entries: 2

Rep: Reputation: 15
Iptables


Hi Guys, I was trying to write IPTABLES script to block the ICMP ping using the below mentioned command in OpenSUSE 11.2
Doing this in VMware.....

iptables -A OUTPUT -o eth0 -p icmp -j DROP

& then I tried to ping the different computer & it didnt allow me to ping.
Then I deleted using the command -

iptables -D OUTPUT -o eth0 -p icmp -j DROP

then I couldnt ping also. Another thing I found is my firefox is not connecting to the internet as well, but before writing the script, I can connect to internet.

I did a "dhclient" & iptables -F.......still no go......any clue......

Last edited by myubuntu; 03-14-2010 at 01:03 AM.
 
Old 03-14-2010, 01:53 AM   #2
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
run
Code:
iptables -vnL
to see which rules are blocking you. P.S your rule was wrong you were blocking all icmp not just ping.
 
Old 03-14-2010, 03:29 AM   #3
myubuntu
LQ Newbie
 
Registered: Feb 2010
Posts: 23

Original Poster
Blog Entries: 2

Rep: Reputation: 15
iptables

Quote:
Originally Posted by datopdog View Post
run
Code:
iptables -vnL
to see which rules are blocking you. P.S your rule was wrong you were blocking all icmp not just ping.
did that no rules are blocking.....also pinged as you can at the bottom, pls let me know what else can be done.

linux-k6qk:~ # iptables -vnL
Chain INPUT (policy DROP 722 packets, 103K bytes)
pkts bytes target prot opt in out source destination

Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination

Chain OUTPUT (policy ACCEPT 365 packets, 25028 bytes)
pkts bytes target prot opt in out source destination

Chain forward_ext (0 references)
pkts bytes target prot opt in out source destination

Chain input_ext (0 references)
pkts bytes target prot opt in out source destination

Chain reject_func (0 references)
pkts bytes target prot opt in out source destination
linux-k6qk:~ # ping 192.168.0.100
PING 192.168.0.100 (192.168.0.100) 56(84) bytes of data.
^C
--- 192.168.0.100 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6014ms
 
Old 03-14-2010, 04:58 AM   #4
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
your INPUT policy is DROP, that is why the traffic is not coming back.

run
Code:
iptables -P INPUT ACCEPT
 
Old 03-15-2010, 12:55 AM   #5
myubuntu
LQ Newbie
 
Registered: Feb 2010
Posts: 23

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Quote:
Originally Posted by datopdog View Post
your INPUT policy is DROP, that is why the traffic is not coming back.

run
Code:
iptables -P INPUT ACCEPT
Hey thanks for your note.....but as I have mentioned above, I have added the rule (which I have typed below) & also I have deleted it,

iptables -A OUTPUT -o eth0 -p icmp -j DROP

Then I deleted using the command -

iptables -D OUTPUT -o eth0 -p icmp -j DROP

also cleaned it using iptables -F , but still couldn't ping & access internet, any clue .....pls let me know.

Last edited by myubuntu; 03-15-2010 at 01:01 AM.
 
Old 03-15-2010, 01:43 AM   #6
datopdog
Member
 
Registered: Feb 2008
Location: JHB South Africa
Distribution: Centos, Kubuntu, Cross LFS, OpenSolaris
Posts: 806

Rep: Reputation: 41
well, am trying to tell you what is wrong and you do not seem to understand so have it your way.
 
Old 03-21-2010, 03:55 PM   #7
myubuntu
LQ Newbie
 
Registered: Feb 2010
Posts: 23

Original Poster
Blog Entries: 2

Rep: Reputation: 15
Thumbs up

Quote:
Originally Posted by datopdog View Post
well, am trying to tell you what is wrong and you do not seem to understand so have it your way.
Hey Pal sorry for the delayed response. I followed the command you gave & it worked fine, thanks very much. Do you know how to make the SSH port listening in openSuse 11.2. I did try to edit the sshd_config & took off the # before the port 22......also tried to check the listening ports (using netstat -an | grep "LISTENING") & I couldnt see the 22 is listening. please let me know.

Last edited by myubuntu; 03-21-2010 at 03:58 PM.
 
  


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
On what basis CHAIN integer values are generated in IPtables under iptables file? haariseshu Linux - Server 3 11-05-2009 04:25 AM
iptables v1.2.9: Unknown arg `/sbin/iptables' Try `iptables -h' or 'iptables --help' Niceman2005 Linux - Security 4 12-29-2005 08:20 PM
Iptables - Couldn't load target `ACCPET':/lib/iptables/libipt_ACCPET.so: z00t Linux - Security 3 01-26-2004 02:24 AM
IPtables Log Analyzer from http://www.gege.org/iptables/ brainlego Linux - Software 0 08-11-2003 06:08 AM
My iptables script is /etc/sysconfig/iptables. How do i make this baby execute on boo ForumKid Linux - General 3 01-22-2002 07:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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