Private networking web/db ipv6

Trying to set up separate web and db servers. I have it working on another host and am trying to migrate both to Linode. Where I'm having confusion is how Linode recommends using the public ipv6 address between the two linodes and my iptables rule.

On the other host I'm using the private ip4's and have set them both up in the /etc/hosts on each server, example: 192.11.23.111 webapp, 192.11.23.222 dbserver. Then in iptables on the db server, I only allow connections to mysql from webapp.

#  Allow DB connections
-A INPUT -i eth1 -s webapp -p tcp --destination-port 3306 -j ACCEPT

So I'm not sure how to edit this rule to allow the ipv6 connection from the webapp.

Or I could skip all this and just use the private ip4's linode provides right?

5 Replies

Also, instead of eth1 in that rule, it should be eth0 since this is all thats used at Linode?

You'd need to use ip6tables to set up rules for IPv6, if I recall correctly.

You are correct, Linodes (by default) use eth0.

Thanks,

Dave.

I got it all working with ipv4 rules, didn't get into the ipv6 yet.

But if there there was an ipv6 version of this page, I would be all set:

~~[https://www.linode.com/docs/security/securing-your-server#creating-a-firewall" target="_blank">](https://www.linode.com/docs/security/se … a-firewall">https://www.linode.com/docs/security/securing-your-server#creating-a-firewall](

This would be a huge help.

Replace every instance of "iptables" with "ip6tables" and you have the IPv6 version.

@jgjh151:

I got it all working with ipv4 rules, didn't get into the ipv6 yet.

But if there there was an ipv6 version of this page, I would be all set:

~~[https://www.linode.com/docs/security/securing-your-server#creating-a-firewall" target="_blank">](https://www.linode.com/docs/security/se … a-firewall">https://www.linode.com/docs/security/securing-your-server#creating-a-firewall](

This would be a huge help.

As our Linode Docs are now open to the community, and you may edit them via GitHub by forking the repository and making a pull request, I would highly encourage you to consider making any Linode Doc article (new or updated) you feel would be a good fit for the project :)

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