Skip to content

Commit

Permalink
Modern Ubuntu DNS handling (#134)
Browse files Browse the repository at this point in the history
Elaborate on how to disable `systemd-resolved` without borking resolution altogether.

Co-authored-by: Paul <[email protected]>
  • Loading branch information
strictlymike and tarterp committed Jan 3, 2020
1 parent e8a6c9a commit 8c3a9fe
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -866,19 +866,38 @@ Use `netstat`, `tcpview`, or other tools to discover what application is bound
to the port, and refer to the corresponding operating system or application
documentation to disable the service.

It may make sense to capture a VM snapshot before undertaking reconfiguration.

For example, Ubuntu commonly enables the `dnsmasq` service in
`/etc/NetworkManager/NetworkManager.conf` with the line `dns=dnsmasq`.
Disabling this (such as by commenting it out) and restarting the
`network-manager` service (e.g. `service network-manager restart`) is
sufficient to free the port before re-launching FakeNet-NG.

In newer versions of Ubuntu or in other distributions, using `lsof -i` may
reveal that `systemd-resolved` is used instead. In these cases, try:
reveal that `systemd-resolved` is used instead. In these cases, you may try
these steps adapted from
<https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu>:

```
sudo systemctl stop systemd-resolved
sudo systemctl disable systemd-resolved
```

Then in `/etc/NetworkManager/NetworkManager.conf` under the `[main]` section, add a line specifying:

```
dns=default
```

Delete the symlink `/etc/resolv.conf`, i.e. `rm /etc/resolv.conf`.

Finally, restart `NetworkManager`:

```
sudo systemctl restart NetworkManager
```

Error: Could not locate WinDivert DLL or one of its components
--------------------------------------------------------------

Expand Down

0 comments on commit 8c3a9fe

Please sign in to comment.