How do I add my IP to the list of hosts allowed to connect through iptables?

Linode Staff

I am trying add an IP address to my iptables rules that will allow it to connect to my server. How can I do this?

1 Reply

Hey there,

First you would want to SSH into your Linode or you can access your Linode via Lish if your IP is being blocked.

Once you are connected to your Linode, you will want to input these two commands. The first will allow incoming connections for your IP, the second will allow outgoing connections for your IP. (Replace 123.123.123.123 with the IP you wish to white list)

iptables -A INPUT -s 123.123.123.123 -j ACCEPT
iptables -A OUTPUT -d 123.123.123.123 -j ACCEPT

I hope this helps!

Mike
Linode Support

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