Error: bad command `​nospoof on' in /etc/host.conf file

Abhi1988 asked:

Iam using a Ubuntu 17.10 VM in GCP. To prevent my server’s IP from being spoofed, I did the below changes in my /etc/host.conf file:

Changed from:

# The "order" line is only used by old versions of the C library.
order hosts,bind
multi on

To

# The "order" line is only used by old versions of the C library.
​order bind,hosts
​nospoof on

But this gave the below error:

/etc/host.conf: line 2: bad command `​order bind,hosts'
/etc/host.conf: line 3: bad command `​nospoof on'

What is going wrong?

My answer:


None of those obsolete options you placed in /etc/host.conf have any effect anymore. And Google will prevent your IP from being spoofed; you don’t have to worry about it.


View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.