Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion

GRE Tunnel subnet /29
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.

GRE Tunnel subnet /29

I watched this tutorial: https://www.lowendtalk.com/discussion/156850/howto-tunnel-ddos-protected-ovh-ip-to-vms-in-other-datacenter

And I have problems with the GRE tunnel, I created a VPS on server 2 with IP from the / 29 subnet (x.198), only I can't connect to the VPS. If I try to connect from server 1 to the VPS server created on server 2 it works (ssh x.198).

IP SV1: x.158
IP SV2: x.242
IP /29: x.192/29
Bridge: bridge0

SV1:
ip tunnel add gre1 mode gre remote x.242 local x.158 ttl 255
ip link set gre1 up
ip route add x.192/29 dev gre1

SV2:
ip tunnel add gre1 mode gre remote x.158 local x.242 ttl 255
ip link set gre1 up
ip rule add from x.192/29 table 666
ip route add default dev gre1 table 666
ip route add x.192/29 dev bridge0 table 666
ip addr add x.193/29 dev bridge0

SV 2 - /etc/sysconfig/network-scripts/ifcfg-bridge0
DEVICE=bridge0
TYPE=Bridge
ONBOOT=yes
BOOTPROTO=static
IPADDR="x.194"
NETMASK="x.248"
GATEWAY="x.193"

Comments

  • AbdAbd Member, Patron Provider

    Server1 -
    Primary IP: x.x.x.x
    Additional IP subnet: 10.37.130.88/29


    Server2 -
    Primary IP: y.y.y.y
    bridge(for vps) - vmbr0


    Server1:
    ip tunnel add gre1 mode gre remote y.y.y.y local x.x.x.x ttl 255
    ip link set gre1 up
    ip route add 10.37.130.88/29 dev gre1



    Server2:
    ip tunnel add gre1 mode gre remote x.x.x.x local y.y.y.y ttl 255
    ip link set gre1 up
    ip rule add from 10.37.130.88/29 table 666
    ip route add default dev gre1 table 666
    ip route add 10.37.130.88/29 dev vmbr0 table 666
    ip addr add 10.37.130.88/29 dev vmbr0



    create VMs on Server2 using gateway as 10.37.130.88

  • RickBakkrRickBakkr Member, Patron Provider, LIR

    Note that the above does only work when the IPs are statically routed over one of the IPs bound to the server at $provider.

    In case you need to 'pull' the traffic from some bigger shared subnet to the VM, you may need proxy_arp to make it work.

    Thanked by 1panthera666
Sign In or Register to comment.