Flushing iptables broke my pipe, how can I save my instance?

Posted by Niels on Server Fault See other posts from Server Fault or by Niels
Published on 2012-08-29T20:32:57Z Indexed on 2012/08/29 21:40 UTC
Read the original article Hit count: 392

Filed under:
|
|
|

I was setting up my iptables when I performed a iptables -F and my ssh pipe broke.

This is the last output of my session:

root@alfapaints:~# iptables -L
Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere             state NEW,ESTABLISHED tcp dpt:2222
ACCEPT     tcp  --  li465-68.members.linode.com  anywhere             state NEW,ESTABLISHED tcp dpt:nrpe
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:9200 state NEW,ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:http state NEW,ESTABLISHED
ACCEPT     udp  --  anywhere             anywhere             udp spt:domain

Chain FORWARD (policy DROP)
target     prot opt source               destination             

Chain OUTPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     tcp  --  anywhere             anywhere             state ESTABLISHED tcp spt:2222
ACCEPT     tcp  --  anywhere             anywhere             state ESTABLISHED tcp spt:nrpe
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:9200 state ESTABLISHED
ACCEPT     tcp  --  anywhere             anywhere             tcp spt:http state ESTABLISHED
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
root@alfapaints:~# iptables -F
Write failed: Broken pipe

I tested my connection just before and I was able to connect with ssh. Now I did a nmap scan and not a single port is open anymore. I know my VPS is running on VMWare ESXi, could a reboot help?

Or if not could I attach and mount the disk to another vm to save the data?

Does anybody have some advise? And maybe an explanation what happend or what could have cause my pipe to break?

ps: I didn't save my rules on the config directories of iptables. But used a file I stored in ~/rules.config to apply my rules like this: iptables-restore < rules.config So probably a reboot would help?

Thanks a lot in advance.

© Server Fault or respective owner

Related posts about ubuntu

Related posts about iptables