LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-24-2004, 01:27 PM   #1
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Rep: Reputation: 30
Big Problem Please Help!!!! Quick


I AM SCREWED BIG TIME!!!!!!!!!

Im using Mandrake 9.1


I Pasted this Rule-based script (below) in the rc.local file.

# optional, for over the top paranoid (and possibly limiting) security
iptables -A OUTPUT -o lo -s 127.0.0.1 -s 127.0.0.1 -j ACCEPT
iptables -A OUPTUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A OUTPUT -p tcp --dport http -j ACCEPT
iptables -A OUTPUT -p tcp --dport https -j ACCEPT
iptables -A OUTPUT -p tcp --dport ftp -j ACCEPT
iptables -A OUTPUT -p tcp --dport pop3 -j ACCEPT
iptables -A OUTPUT -p tcp --dport smtp -j ACCEPT
iptables -A OUTPUT -p icmp --icmp-type echo-request -j ACCEPT
iptables -P OUTPUT DROP



WHEN I REBOOT UP LINUX, IT SHOWS INITIALIZING SERVICES FOR ABOUT 5 MINUTES AND THEN IT STARTS TO LOAD UP THE APPLICATIONS AND ICONS ON THE DESKTOP VERY VERY SLOWLY.

NOW HOW COULD I FIX THIS PROBLEM???

i can't even open up GEDIT to UNFIX the problem.

Last edited by unixfreak; 08-24-2004 at 01:31 PM.
 
Old 08-24-2004, 01:41 PM   #2
otish1000c
Member
 
Registered: May 2004
Location: Pennsylvania, USA
Distribution: dual boot.... Mandrake 10.0OE/10.xcooker
Posts: 611

Rep: Reputation: 30
stop shorewall by styping in terminal as root.......

Code:
service shorewall stop
(enter)

then, go to /etc/shorewall/rules & edit the file so the last line looks like this.........

Code:
#
##############################################################################
#ACTION		SOURCE	DEST	PROTO	DEST	SOURCE	ORIGINAL	RATE	USER					
#					PORT	PORT(S)	DEST		LIMIT	SET

#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
IE: no rules set. then, don't set no more steenking rules that you're not sure about!

otis
 
Old 08-24-2004, 01:41 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
Moved: This thread is more suitable in Linux-Security and has been moved accordingly to help your thread/question get the exposure it deserves.

And using a more descriptive title and not SHOUTING in tyour thread is likely to gain you much more of a response.
 
Old 08-24-2004, 01:42 PM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi

when linux loads up
enter into inteacrtive mode by pressing 'i' ( i hope it is there in mandrke as in redhat)

do not start thye serices and see if then u can edit the rc.local

also u can try to go in to rescue mode an there u can edit ur rc.local file

regards
 
Old 08-24-2004, 01:43 PM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
any reason this thread couldn't have been called "iptables rules making system unusable" or similar?
 
Old 08-24-2004, 01:45 PM   #6
colnago
Member
 
Registered: Nov 2003
Location: Canada
Distribution: ArchLinux
Posts: 324

Rep: Reputation: 30
I would guess that you have your host set up as you internet address in /etc/hosts rather than 127.0.0.1. Just speculation on my part really. Anyway, try ctrl-alt-f1 and login as root, then flush your iptables rules: 'iptables -F' on the command line. Use something like this until you get the other rules straightened out, it works for me, it is so much like yours I don't know what was wrong, I guess something is needed outbound that is not in your accept list:
Code:
   iptables -F
   iptables -P OUTPUT ACCEPT
   iptables -P FORWARD DROP
   iptables -P INPUT DROP
   iptables -A INPUT -i lo -j ACCEPT
   iptables -A OUTPUT -o lo -j ACCEPT
   iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT

Last edited by colnago; 08-24-2004 at 01:51 PM.
 
Old 08-24-2004, 01:48 PM   #7
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
Please be more specific.

I know nothing about Linux. Please explain how could I get into the resue mode. There is a Interactive setup when it boots.

What do I from there to unfix this.

Please.... I need specific explainations.
 
Old 08-24-2004, 01:49 PM   #8
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
I DO NOT WANT TO MESS WITH ANY SCRIPTS FROM NOW ON. I just want to get back into GEDIT and undo what I had Pasted.
For right now, I want to start from scratch.
I want to unfix this, so please explain. Im dieng in nervous wreck here.
I want to be able to get back in GEDIT to delete the script.

The problem was caused by all this

http://www.linuxquestions.org/questi...hreadid=221411

Post#5

Last edited by unixfreak; 08-24-2004 at 01:58 PM.
 
Old 08-24-2004, 02:05 PM   #9
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
don't use gedit... boot to single user mode and fix it from a console. when your lilo or grub screen appears, press esc (lilo) or E (grub) and add a "1" to the boot line and then load it. this will not load any advanced stuf like iptables, so it will respond just fine. then try to use pico (if installed) or vi or emacs to load that file, delete as appropriate, and save. and then reboot. sorted.

and please keep an eye on that caps lock button.....
 
Old 08-24-2004, 02:06 PM   #10
colnago
Member
 
Registered: Nov 2003
Location: Canada
Distribution: ArchLinux
Posts: 324

Rep: Reputation: 30
Did you try ctrl-alt-f1, do this when the system is slowly doing its thing. This should get you a terminal where you can flush the rules. Then ctrl-alt-f7 to get back to the desktop and it should be normal speed then.
 
Old 08-24-2004, 02:22 PM   #11
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
OK, I AM TOTALLY CONFUSED!!!!!!!!!!!!!

When should I use the ctrl-alt-f1????????? When the GRUB window opens? or WHAT????

Thats the problem...is that I dont know when to do ctrl-alt-f1. Please explain.

And how should I flush the rules.
I do not know what to type in the terminal. Please explain step-by-step. As I do not understand Linux at all.

Please explain. I am new and lost this. So im confused I need to get this working by 30 minutes.

Last edited by unixfreak; 08-24-2004 at 02:35 PM.
 
Old 08-24-2004, 02:53 PM   #12
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
I typed iptables -F and nothing seemed to happen.

I dont know, but I have to say that my Linux is pretty messed up now. I dont know what I had done.

I need simple answers here. Please I need to get into GEDIT and delete the script somehow.

And as I recall, The iptables is not even running.

Last edited by unixfreak; 08-24-2004 at 02:55 PM.
 
Old 08-24-2004, 03:09 PM   #13
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there
why don't u go to linux rescue mode and delete the entry in rc.local file
regards
 
Old 08-24-2004, 03:17 PM   #14
unixfreak
Member
 
Registered: Jul 2004
Distribution: Linux 2.4.21-0.13mdk, W2K
Posts: 412

Original Poster
Rep: Reputation: 30
OK, BUT HOW??????????????????????

I NEED SPECIFIC ANSWERS HERE FOR CRYING OUT LOUD!!!!

When the GRUB window loads how do I get into the Rescue Mode???

For cring out load.
 
Old 08-24-2004, 03:25 PM   #15
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
i've already given you instructions on exactly how to do this. you seem to be taking the different approaches detailed (all of which are valid) and picking random bits out into somethign that no longer makes sense.

hit esc or e on the lilo or grub boot menu, add a 1 to the line, and boot it.

being abusive and aggressive to benevolent members will not settle well. please abide by the rules of this site if you wish to remain a welcome member.
 
  


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
Big O, Big Omega, and Big Theta oulevon Programming 7 05-26-2010 07:18 AM
Big, big Problem on vsftpd rhonneil Linux - Newbie 1 10-01-2003 02:18 PM
Installing RH 9 with RAID 5 --Big, big Problem!!! rhonneil Linux - Software 2 09-25-2003 08:13 PM
Shared library problem (BIG problem) jlg Slackware 1 03-25-2003 10:56 PM
big BIG javascript & loading time luigi Programming 3 09-10-2001 03:53 AM

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

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