The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    30
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  3. crossing

    crossing Active Member

    Joined:
    Oct 23, 2012
    Messages:
    30
    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 Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,808
    Likes Received:
    667
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page