Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

How to setup cPanel with GRE tunnel ?

Discussion in 'Security' started by crossing, Feb 16, 2016.

  1. crossing

    crossing Active Member

    Joined:
    Oct 23, 2012
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Hello,

    I need to protect my WHM Cpanel VPS against DDoS using nearby DDoS protected VPS. Anyone can guide me step by step how to achive that ?

    I have tried this but failed:

    On protected VPS:

    echo 'net.ipv4.ip_forward=1' >> /etc/sysctl.conf
    sysctl -p
    iptunnel add gre1 mode gre local YOUR_FILTERED_IP remote DESTINATION_SERVER_IP ttl 255
    ip addr add 192.168.168.1/30 dev gre1
    ip link set gre1 up


    On the remote server I wish to protect:

    iptunnel add gre1 mode gre local DESTINATION_SERVER_IP remote YOUR_FILTERED_IP ttl 255
    ip addr add 192.168.168.2/30 dev gre1
    ip link set gre1 up



    Thank you..
     
  2. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,435
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello :)

    This is a custom network configuration, and there's no native options in cPanel that will automatically configure/enable this setup. However, searching for a term such as "cPanel GRE Tunnel" on Google yields several results. Feel free to let us know if you encounter any issues with cPanel after configuring this.

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. crossing

    crossing Active Member

    Joined:
    Oct 23, 2012
    Messages:
    32
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Reseller Owner
    Hello,

    Its done but after server reboot all settings are lost. Where should I add this commands to be run it on reboot ?

    iptunnel add gre1 mode gre local DESTINATION_SERVER_IP remote YOUR_FILTERED_IP ttl 255
    ip addr add 192.168.168.2/30 dev gre1
    ip link set gre1 up

    ip rule add from 192.168.168.0/30 table DDoS
    ip route add default via 192.168.168.1 table DDoS
     
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    45,435
    Likes Received:
    1,961
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice