N
N
Nicholas Secret2016-01-18 19:11:37
SSH
Nicholas Secret, 2016-01-18 19:11:37

Why does the host stop responding when I turn off iptables over ssh?

When I am connected to the server via shh, I do iptables -F, the host throws me out of the way, the kicks do not go. I went to the server room and connected the monitor, I look at the screen it says "pres eni kay", I press it, everything worked. Made a script

#!/bin/sh
iptables -F
iptables -X
iptables -P INPUT ACCEPT 
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
.
chmod 777 +x . I execute locally, the script works out and writes "prey eni key". How to get around?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir, 2016-01-18
@rostel

iptables -P INPUT ACCEPT 
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
iptables -X
iptables -F

first we allow everything by default, otherwise the terminal nails right after iptables -F

V
Vlad Zhivotnev, 2016-01-18
@inkvizitor68sl

Because iptables needs to be applied via iptables-save > file/ cat file | iptables-restore, not the hell.
And so yes - the script stops its work after iptables -F, the default policy of your current REJECT, apparently. -F policy does not change.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question