Need help setting up a gre tunnel on a amazon ec2

Discussion in 'Systems Administration' started by Tennobanzai, Oct 1, 2014.

  1. Hi im the owner of a small minecraft server. I have an amazon ec2 that i want to use to connect to my bungeecord server. I can't set up a gre tunnel. I've been tryign to days to no avail. Is there anyone who has done this before and is willing to help me?
     
  2. And why would you need this tunnel (just asking)
     
  3. PhanaticD

    Patron

    if you do "modprobe ip_gre" whats the output
     
  4. Cheap ddos protection.
    "modprobe: FATAL: Module ip_gre not found."

    The image im using is

    Amazon Linux
    64-bit
    Amazon Linux AMI 2014.09 (HVM) - ami-8786c6b7
    The Amazon Linux AMI is an EBS backed image. It includes the 3.14 kernel, Ruby 2.1, PHP 5.5, PostgreSQL 9.3, Docker 1.2, the AWS command line tools, and repository access to many other packages.

    I also tried it on this and still get "modprobe: FATAL: Module ip_gre not found."

    Ubuntu Server 14.04 LTS (HVM), SSD Volume Type - ami-33db9803
    Ubuntu Server 14.04 LTS (HVM), EBS General Purpose (SSD) Volume Type. Support available from Canonical
     
  5. PhanaticD

    Patron

    the kernel does not support GRE tunneling, unless you can switch to a regular kernel it will not be possible
     
  6. Ah i see thanks for the info. Do you know of any other ways something similar for redirecting traffic?
     
  7. You could put your Bungeecord instance on ec2.
     
  8. md_5

    Administrator Developer

    Is this Minecraft related? Minecraft on EC2 will burn your wallet to pieces.
     
    • Agree Agree x 4
  9. I'm not sure about about their DDoS policy, but as @md_5 mentioned, it'll burn your wallet to pieces. Their network pricing is absolutely nuts. You should check out a cheaper and DDoS protected VPS such as OVH or BuyVM.
     
  10. Alright then do I need a cloud vps? A search showed that some people that went with Classic also had the problem with their kernel not allowing gre tunneling.
     
  11. You can also use IPTables for forwarding.
     
  12. How would that work? I thought ip tables just did stuff for fireballing and internal networking
     
  13. PhanaticD

    Patron

    with OVH you can just use another kernel (that what i did :p)
     
  14. kill_da_trolls

    Supporter

    on the classic VPS? Believe that you need to use VMWare, which the Cloud line supports.
     
  15. This will not achieve any kind of protection.
     
    • Agree Agree x 1
  16. Yes, I currently use an OVH Cloud for my GRE Tunnel - works well!
     
  17. ddedicated server :3
     
  18. Classics allow for TCP Tunnels, Cloud allows for GRE Tunnels.
     
  19. Alright I can't seem to figure our what I'm doing wrong I'm setting up a tcp tunnel on a BuyVM VPS
    echo 1 > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A PREROUTING -p tcp -m tcp --dport 25565 -j DNAT --to-destination BungeeCordIP:25577
    iptables -t nat -A POSTROUTING -j MASQUERADE

    When i connect to my BuyVM on port 25565 it just gives me a connection refused no further information.
    Is there something i need to enable to use iptables for tcp tunneling? Or Should I be going about a different route
     
  20. 1. Using a remote machine isn't gonna stop any DDoS attacks if thats what you're doing.
    2. Why not just use your bungeecord server ip?