New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to make iptables running and default configuration from rescue mode?
Hello,
being logged to the server via SSH in rescue mode: Linux rescue.ovh.net 3.14.32-xxxx-std-ipv6-64-rescue
how to make sure in normal (non-rescue) mode, iptables will be running at boot time and it will have default rules in them?
There is
df -h
find / -name "iptables"
output (done from rescue mode):
http://pastebin.com/3jj2vrFR
Comments
Chroot into your system and remove your rules.
How can i do it please? im a newbie in this.
Mount your drive (for example sda)
Then chroot into your system
Run command in your system
Thank you, this command not worked saying: mount: can't find /dev/sda in /etc/fstab
not even sda1, 2...
But this worked:
fdisk -l
so i see partitions:
Then i did: mount /dev/sda2 /mnt/hd
then as you adviced: chroot /mnt/hd
iptables -L shows:
so it appears right, not sure if it not conencted.
These are latest command in history when server was running in normal non rescue mode:
http://pastebin.com/gc9N16iv
So the problem appeared after flushing and restarting iptables in non rescue mode.
Current SSHd config file (on chroot /mnt/hd):
Please do you see anything strange in that which can prevent connection and idea how to fix?
Keep in mind this is not your system. You are logged in the recovery system.
Your iptables are empty. In your lastest command you changed your ssd config. What did you change?
I changed SSH port number in non rescue mode and that is why i was unable to connect via SSH. So everything appears to work now. I thank you very much for usefull commands mount, chroot
it helped. also iptables -F might have been solution if the cause was iptables. But i wonder if iptables-save would have been required to apply changes.