We are in the process of migrating this forum. A new space will be available soon. We are sorry for the inconvenience.

I accidentally ran iptables -F


nowwhat
27/12/2016, 21h19
Citation Envoyé par craggles17
Which has blocked all my ports including ssh, .....
THis is why you should read this : https://forum.kimsufi.com/forumdispl...w-To-Tutorials before you even think of the word "iptables".

Citation Envoyé par craggles17
When I try and use rescue-pro is claims the connection is refused, if I try and use bsd rescue I can ssh in but I can't then edit the iptables using that.
Did you receive the mail with the temporary root 's password for that unique rescue session ?
You don't need to 'edit' iptables.
iptables is a command that you use to alter predefined rules.
The predefined rules, when you boot your OS are :
Code:
root@vps62725:~# iptables -L -vn
Chain INPUT (policy ACCEPT 26689 packets, 2388K bytes)
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
Chain OUTPUT (policy ACCEPT 25980 packets, 2857K bytes)
 pkts bytes target     prot opt in     out     source               destination
If you use a tool (script, whatever) that loads firewall rules, or changes the policies .... then you should modify this script file (or even stop it from loading). This is where the rescue mode comes in.
YOUR OS isn't booting when you use recue mode. Neither the YOUR config on your server's disk.
Better yet : your disk isn't even 'logically attached' (== mounted) when the rescue OS started.
You are aware of the fact that you should MOUNT your partitions first before you can access YOUR files when you use rescue mode ?
Read again the How-to : this one : https://forum.kimsufi.com/showthread...To-Rescue-Mode

janus57
24/12/2016, 19h16
Hello,

if you don't have a script that run the blocking rules at startup a simple reboot should be enought.

By default (under GNU/Linux) iptables don't save the setting on the server and a reboot will erase all the settings unless you setup a script or software that re-made the setting at startup.

Cordially, janus57

craggles17
24/12/2016, 16h26
Which has blocked all my ports including ssh, When I try and use rescue-pro is claims the connection is refused, if I try and use bsd rescue I can ssh in but I can't then edit the iptables using that.

Any help welcome,
Craggles