New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
routing it through the tunnel from the vps should be working fine. what have you tried? could you share your configuration?
https://community.hetzner.com/tutorials/linux-setup-gre-tunnel
Server A - the server that all the clients will connect to
IP: hetzner server ip
GRE tunnel internal IP: 10.0.0.1
Server B - the server which is actually running all the applications
IP: vps ip
GRE tunnel internal IP: 10.0.0.2
please share the output of the commands on both servers:
you can censor the IPs in the output
On the hetzner
iptunnel add gre1 mode gre local hetznerip remote vpsip ttl 255
ip addr add 10.0.0.1/30 dev gre1
ip link set gre1 up
On the VPS
iptunnel add gre1 mode gre local vpsip remote hetznerip ttl 255
ip addr add 10.0.0.2/30 dev gre1
ip link set gre1 up
then you should be able to ping back an forth via 10.0.0.1 -> 10.0.0.2 etc
To use the IPs however is a bit more complex and I don't have the time to type it all out but look at BuyVM's guide https://wiki.buyvm.net/doku.php/gre_tunnel
I wrote a tutorial on how to move an IPv4 to another server:
https://yoursunny.com/t/2023/borrow-ipv4/
Public IPv4 (Test) server 1: 92.xxx.190.175
Public IPv4 server 2 (Hetzner) : 208.xxx.109.66
IP I want to use on server 2: 92.xxx.180.147/32
virtualizor new vps default gateway: 92.xxx.180.147
vps ip: 92.xxx.183.124
Bridge interface server2: viifbr0
Run this on server 1:
ip tunnel add gre1 mode gre remote 208.xxx.109.66 local 92.xxx.190.175 ttl 255
ip link set gre1 up
Run this on server 2:
ip tunnel add gre1 mode gre remote 92.xxx.190.175 local 208.xxx.109.66 ttl 255
ip link set gre1 up
Then we need to create a route on server 1 that will route the IP traffic over the GRE tunnel
Run this on server 1:
ip route add 92.xxx.180.147/32 dev gre1
The next step is to route data from the GRE tunnel to the bridge and back.
Run this on server 2:
ip rule add from 92.xxx.180.147/32 table 666
ip route add default dev gre1 table 666
ip route add 92.xxx.180.147/32 dev viifbr0 table 666
Last thing to do is to add the a IP the to bridge. This is gonna be the gateway for you VM's!
Use the second IP of the range!
Run this on server 2:
ip addr add 92.xxx.180.147/32 dev viifbr0
If all this stuff hurts your brain just use wireguard
https://darkimmortal.com/tunnel-a-secondary-public-ip-from-one-server-to-a-vm-on-another-server/
Thank you for sharing. Will try it out.
Have you tested it out for ipv6? If yes, any recommendations/notes?
How about borrow /64 blocks ipv6?