Linux - SecurityThis forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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!
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
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.
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.....
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.