I need to add a static route to my system. I can do it with no problem at the command line with:

ip route add via src

To make it permanent I created the /etc/sysconfig/network-scripts/route-tun10 file with the following line: via src

But when I run ifup tun10 command (even after a ifdown tun10 command) I get the following error:

".ror: inet address is expected rather than "

Could somebody, please, help me understand and solve the problem?

Thanks. Paolo.


It looks like your route-tun10 file has a stray carriage return at the end of the line. This is usually because the file was created on Windows and then copied to the system. It's a good idea to avoid Windows text editors due to their line endings causing confusion on Linux systems, unless you can explicitly configure the text editor to use Unix line endings.

To fix the problem with this file, run dos2unix on it, which will remove the carriage returns and leave only newlines. For example:

sudo dos2unix /etc/sysconfig/network-scripts/route-tun10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.