Answer the question
In order to leave comments, you need to log in
How to raise a GRE tunnel on CentOS startup?
I'm trying to set up a GRE tunnel on CentOS, I made the /etc/gre.sh script:
#!/bin/bash
ip tunnel add gre1 mode gre remote 20.20.20.100 local 10.10.10.1
ip link set gre1 up
ip addr add 10.5.5.1/30 dev gre1
@reboot /etc/gre.sh
Answer the question
In order to leave comments, you need to log in
In the cron tab, after the @reboot entry, it is first written from which user you need to start, then after how many seconds after the system starts, then be sure to put ; and not: I figured out with this later to understand what the error is, in general, the entry should be like this
@reboot root sleep 10; /opt/gre.sh
And you need to give the script permissions to read, etc. chmod command
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question