Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Oct 24, 2013 6:20 am 
Offline
Newbie

Joined: Tue May 10, 2011 12:59 am
Posts: 4
Hi there

I followed the steps here: https://library.linode.com/securing-your-server

in relation to installing fail2ban and changing my iptables config — I followed the steps in that article but have now lost ssh access to my linode.

I can get in via Lish but am unsure what to do next to restore access.

If I run
Code:
sudo iptables -L -n
, I get the following:

Code:
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
fail2ban-ssh  tcp  --  0.0.0.0/0            0.0.0.0/0            multiport dports 22
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           
REJECT     all  --  0.0.0.0/0            127.0.0.0/8          reject-with icmp-port-unreachable
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:80
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:443
ACCEPT     tcp  --  0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:22
ACCEPT     icmp --  0.0.0.0/0            0.0.0.0/0           
LOG        all  --  0.0.0.0/0            0.0.0.0/0            limit: avg 5/min burst 5 LOG flags 0 level 7 prefix "iptables denied: "
DROP       all  --  0.0.0.0/0            0.0.0.0/0           

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
DROP       all  --  0.0.0.0/0            0.0.0.0/0           

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  0.0.0.0/0            0.0.0.0/0           

Chain fail2ban-ssh (1 references)
target     prot opt source               destination         
RETURN     all  --  0.0.0.0/0            0.0.0.0/0         


And at this stage, /var/log/fail2ban.log only reveals:

Code:
2013-10-24 20:30:23,662 fail2ban.server : INFO   Changed logging target to /var/log/fail2ban.log for Fail2ban v0.8.6
2013-10-24 20:30:23,665 fail2ban.jail   : INFO   Creating new jail 'ssh'
2013-10-24 20:30:23,665 fail2ban.jail   : INFO   Jail 'ssh' uses poller
2013-10-24 20:30:23,747 fail2ban.filter : INFO   Added logfile = /var/log/auth.log
2013-10-24 20:30:23,752 fail2ban.filter : INFO   Set maxRetry = 6
2013-10-24 20:30:23,757 fail2ban.filter : INFO   Set findtime = 600
2013-10-24 20:30:23,760 fail2ban.actions: INFO   Set banTime = 600
2013-10-24 20:30:23,927 fail2ban.jail   : INFO   Jail 'ssh' started


Any clues on how to restore ssh access would be appreciated.


Top
   
PostPosted: Thu Oct 24, 2013 6:28 am 
Offline
Newbie

Joined: Tue May 10, 2011 12:59 am
Posts: 4
Ah, I just realised my issue. I'd changed the ssh port away from 22 to something more obscure and of course my iptables config above refers to port 22 — so problem solved.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group