The local IP isn't used anywhere and the remote subnet assignment also seems off, but since this works I'll leave it for somebody else to maintain when it's moved to the plugins.