Editing iptables via Lish?

Alright, a better question:

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

4 Replies

https://www.linode.com/docs/security/fi … h-iptables">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?

@Vance:

https://www.linode.com/docs/security/fi … h-iptables">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.

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.

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 :)

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct