LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-17-2015, 02:28 PM   #1
Sathish86
LQ Newbie
 
Registered: Aug 2015
Posts: 3

Rep: Reputation: Disabled
Disabling iptables before booting


Hi all,

I am facing with the following issues.

1.when i boot my server it is failing at ip6tables. I added a wrong rules to ip6tables by mistake.

# /opt/ap/apos/bin/clusterconf/clusterconf ip6tables --m_add "all -A INPUT -o eth1 -j DROP"
Rule ip6tables all -A INPUT -o eth1 -j DROP added

In the above command instead of OUTPUT -0 i have given INPUT -0.

so the system returning error as "cant use -o with INPUT.

now in maintenance mode with root password, i tried to flush & delete rules but it didnt worked. How to do in GREB mode?

Awaiting your reply..
 
Old 08-17-2015, 05:25 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,285

Rep: Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956
You rename that file or edit the file in single user mode I'd think. Might boot to live media and edit and or change it also.

Not sure I know of a way to do it from any loader like Grub.
 
Old 08-18-2015, 05:21 PM   #3
Sathish86
LQ Newbie
 
Registered: Aug 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Jefro,

Thanks for your Reply. How to rename the file?

In my server i am getting 2 modes. 1.Operational mode 2.maintenance mode.
I can go to Grub> mode in Operational mode by pressing C.
Can you please suggest how to disable ip6tables in Grub mode? Whatever changes i made in maintenance mode is not reflecting if i boot.
 
Old 08-18-2015, 09:36 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,285

Rep: Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956
Grub can't be used to edit files as far as I know yet.

Boot to a live cd and edit the files you wish may be the best place to start.
 
Old 08-18-2015, 10:20 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
If you disable all iptable rules that would kick off on a reboot, the default rules for a freshly booted box would default to just the three tables in ACCEPT mode.

http://serverfault.com/questions/497...ng-oneself-out
https://access.redhat.com/documentat...t-act-sav.html

Flush/Delete and start over-
http://www.thegeekstuff.com/2011/01/...ptables-flush/

ADD and DELETE Rules
https://fedoraproject.org/wiki/How_t...iptables_rules
 
Old 08-20-2015, 04:57 AM   #6
Sathish86
LQ Newbie
 
Registered: Aug 2015
Posts: 3

Original Poster
Rep: Reputation: Disabled
Hi Ztcoracat,

i tried all the procedure mentioned on the links, but it is not helpful.

I start my server in "Rescue Mode", but when I login, there is no such thing as /etc/sysconfig/iptables to edit.

What can be done so I can edit that file from this rescue mode? Or at least, is there a way to reboot the system while ensuring, iptables is not started, while inside of the rescue mode?

Is there any command to mount files in Grub> mode for fixing?
 
Old 08-20-2015, 04:59 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 19,285

Rep: Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956Reputation: 2956
Boot to a live cd.
 
Old 08-20-2015, 05:46 PM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162Reputation: 1162
Quote:
Originally Posted by Sathish86 View Post
Hi Ztcoracat,

i tried all the procedure mentioned on the links, but it is not helpful.

I start my server in "Rescue Mode", but when I login, there is no such thing as /etc/sysconfig/iptables to edit.

What can be done so I can edit that file from this rescue mode? Or at least, is there a way to reboot the system while ensuring, iptables is not started, while inside of the rescue mode?

Is there any command to mount files in Grub> mode for fixing?
Sorry those links didn't help.

I you don't have the /etc/sysconfig/iptables it could be a bug or maybe the iptables are not loading.
That file is responsible for the firewall configuration.
Manual customization of that file is not recommended but it's not prohibited.

http://unix.stackexchange.com/questi...not-recommende
https://access.redhat.com/discussions/1341583

If you didn't set up your setup or system-config-firewall-tui than that's my guess why you don't have that file.
I am not good with deleting, inserting, replacing or flushing rules for iptables. Sorry.
You can break the network connection with mistakes in rules if your not careful.

ASAIK you can't mount files in GRUB but you can edit partitions and the linux image. (edit the kernel line)
Aside from that the file that you can mount in Grub is the file where the first boot image is found and I don't think you want that.

If you mean is there a way to stop iptables? Yes......
Execute 'setup' in the terminal. Than go to "firewall configuration" Uncheck Enabled box and click ok.
<OR> go here and follow these instructions.
http://www.cyberciti.biz/faq/fedora-...able-firewall/

-:::-If you can't disable the iptables before going into rescue mode your best bet is to try what jefro said and boot with a Live CD.-:::-
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Disabling Windows 8 Secure Boot. Does it allow Dual Booting or not. Ace Blackwell Linux - Laptop and Netbook 13 01-04-2013 04:04 AM
SELinux - disabling in CentOS 5.1 prevents LVM from loading and/or booting tiber Linux - Software 2 02-09-2008 05:51 AM
Install stucks at "disabling IRQ #11" when booting transfear Mandriva 1 12-20-2005 07:15 AM
Disabling single user when booting carcassonne Linux - Security 6 07-21-2005 03:55 PM
iptables rule for disabling mp3/audio files prakashpms Linux - Security 1 06-07-2004 03:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration