Fakenet-NG Errno 98 in REMnux v2021.15.2

Running FakeNet-NG from a freshly deployed Remnux may give out an Errno 98 message.


For this writing, the issue was encountered in a REMnux v2021.15.2.  Hopefully, this would also be helpful with other version of REMnux.


This issue is usually encountered because another program is binded to the DNS port (53).


To fix this, we only need a few steps.
  1. FakeNet-NG requires a valid network route.  
    1. Check VM network settings


    2. And an IP address



    3. Problems with having an IP address may be resolved by renewing the dhcp with this command
      renew-dhcp
    4. (Optional) Check Internet connection


  2. Since the systemd-resolve is bound with the DNS port, we'll have to disable it first.
    sudo systemctl stop systemd-resolved
    sudo systemctl disable systemd-resolved
  3. Then we have two options to get DNS resolution
    1. (Option 1)
      1. Edit /etc/NetworkManager/NetworkManager.conf
        sudo nano /etc/NetworkManager/NetworkManager.conf
      2. Then add the following line under [main]
        dns=default
    2. (Option 2)
      1. Edit /etc/resolv.confc/systemd/resolved.conf
        sudo nano /etc/systemd/resolved.conf
      2. Then make sure that the following line is commented out
        #DNSStubListener=yes
      3. Then add the following line
        DNSStubListener=no
  4. Delete resolv.conf
    sudo rm /etc/resolv.conf
  5. Link the resolv.conf produced by systemd to /etc/resolv.conf
    sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
  6. Restart NetworkManager to reflect the changes
    sudo systemctl restart NetworkManager
  7. Run Fakenet-NG
    sudo fakenet


At this point, running fakenet will be successful.  However, as of this writing, Fakenet-NG in Linux defaults to a MultiHost network mode.  For some reason, in this mode, visiting a website from the browser will not show up the expected Fakenet-NG default HTML page.  Fakenet-NG logs will only show requests to IP addresses.



What we want is to see request headers along with the domain.
All we need to do is change the network mode to SingleHost.

Just press CTRL+C to stop Fakenet-NG.

The path of Fakenet-NG's configuration is shown after running Fakenet-NG.  The first entry at the start of the log.  
sudo nano /usr/local/lib/python2.7/dist-packages/fakenet/configs/default.ini

Edit the the configuration and change the NetworkMode to SingleHost.

Run Fakenet-NG again then visit any website.  It should now display Fakenet-NG's default page.



If this helped you, please subscribe to my YT channel as I plan to start uploading some tutorials there.  Channel is 8-bit n00b.






    Popular Posts