Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sat Dec 27, 2014 2:49 am 
Offline
Newbie

Joined: Sat Dec 27, 2014 2:00 am
Posts: 4
Alright, a better question:


How do I edit the iptables on my GNU+Linux install on my Linode via Lish?


Top
   
PostPosted: Sat Dec 27, 2014 4:17 am 
Offline
Senior Member
User avatar

Joined: Sun Jan 18, 2009 2:41 pm
Posts: 830
https://www.linode.com/docs/security/fi ... h-iptables

What distribution are you using?

Are you using straight iptables, or are you using something like ufw, firestarter, or firewalld to manage the firewall rules?


Top
   
PostPosted: Sat Dec 27, 2014 4:33 am 
Offline
Newbie

Joined: Sat Dec 27, 2014 2:00 am
Posts: 4
Vance wrote:
https://www.linode.com/docs/security/firewalls/control-network-traffic-with-iptables

What distribution are you using?

Are you using straight iptables, or are you using something like ufw, firestarter, or firewalld to manage the firewall rules?


Ubuntu. I locked myself out by changing the default port for SSH to another port and, thanks to good'ol sleep deprivation, forgot to open the new port.

Been at this for about 3 hours straight now.


Thanks for replying.


Top
   
PostPosted: Sat Dec 27, 2014 1:19 pm 
Offline
Linode Staff

Joined: Mon Aug 18, 2014 2:43 pm
Posts: 35
Website: https://levlaz.org
Location: Absecon, NJ
Which port did you switch it to? You shoud be able to run the following command in order to open up whichever port you switched SSH to.

iptables -A INPUT -p tcp -m multiport --destination-ports $YOURPORT -j ACCEPT

Replace $YOURPORT with the port.

_________________
Best,
Lev
https://levlaz.org


Top
   
PostPosted: Sat Dec 27, 2014 5:58 pm 
Offline
Newbie

Joined: Sat Dec 27, 2014 2:00 am
Posts: 4
I got it working. I did a port scan with nmap and it came back saying 22 was closed. I am writing up a tutorial now in case if anyone else runs into the same issue that I did and I'll post it here :)


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


Who is online

Users browsing this forum: No registered users and 5 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