mirror of
https://github.com/PrivSec-dev/privsec.dev.git
synced 2025-05-05 07:45:05 -04:00
Multiple fixes to Linux posts (#111)
* Multiple fixes to Linux posts Co-authored-by: wj25czxj47bu6q <96372288+wj25czxj47bu6q@users.noreply.github.com> Signed-off-by: Tommy <contact@tommytran.io>
This commit is contained in:
parent
90b4fbcc1e
commit
9bbe003b35
3 changed files with 7 additions and 41 deletions
|
@ -103,19 +103,6 @@ sudo hostnamectl hostname "localhost"
|
|||
|
||||
An empty (blank) hostname is also an option, but a static hostname of "localhost" is less likely to cause breakage. Both will result in no hostname being broadcasted to the DHCP server.
|
||||
|
||||
### Disabling transient hostname management {#rmhostname-transient}
|
||||
|
||||
It's best to create a dedicated configuration file, such as `/etc/NetworkManager/conf.d/01-transient-hostname.conf`, to ensure package updates do not overwrite the configuration:
|
||||
|
||||
```
|
||||
[main]
|
||||
hostname-mode=none
|
||||
```
|
||||
|
||||
This will prevent NetworkManager from setting transient hostnames that may be provided by some DHCP servers. This will have no visible effect except with an empty static hostname.
|
||||
|
||||
After editing the file, run `sudo nmcli general reload conf` to apply the new configuration. Run `sudo hostnamectl --transient hostname ""` to reset the transient hostname.
|
||||
|
||||
---
|
||||
|
||||
## Disable sending hostname to DHCP server
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue