[URGENT] IPTables messed up!

Support for security such as Firewalls and securing linux
Atmazphere
Posts: 1
Joined: 2016/01/13 17:40:10

[URGENT] IPTables messed up!

Postby Atmazphere » 2016/01/13 17:44:56

Hello,
I was recently trying to open a 'query-port' on my SoYouStart dedicated server, it's running CentOS 6.6 and it all screwed up. Nothing will load (the website, the ports are all closed, etc).
I really have no clue what's wrong, my last fix is to reinstall... No ports will work (With my Minecraft server) if you're firmailar with what that is (Multicraft, etc).

But, let's cut the chase, I cannot do anything, nothing will load. I tried restarting the dedicated server, no luck. I tried restarting all services, no luck...

Take a look at my file.

Code: Select all

# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT


Not really much to explain, just nothing will work AT ALL, besides FTP, SSH, Etc.

Thanks guys,
Tyler

vr_driver
Posts: 3
Joined: 2016/01/10 13:36:29

Re: [URGENT] IPTables messed up!

Postby vr_driver » 2016/01/14 04:28:29

hey man,

I'm not an expert, but if you wipe all rules and start again, that may be your best bet...

iptables -F

Then start by adding the rules again. :)

https://www.digitalocean.com/community/ ... wall-rules

Just a thought...

Whoever
Posts: 964
Joined: 2013/09/06 03:12:10

Re: [URGENT] IPTables messed up!

Postby Whoever » 2016/01/14 06:21:27

Install system-config-firewall and system-config-firewall-tui and use one of these tools to configure iptables to allow incoming ftp, http, and other ports.

User avatar
TrevorH
Forum Moderator
Posts: 21158
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: [URGENT] IPTables messed up!

Postby TrevorH » 2016/01/14 14:22:33

Your existing rules only allow tcp port 22 (ssh/sftp/scp) through. Nothing else will work unless you add more rules.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke