Setting Up and Configuring FakeNet in REMnux
Issue: FakeNet Fails to Run Due to Port Conflict
Error Encountered:
Upon running FakeNet, an error with code 98 might occur, indicating that the address (Port 53, DNS port) is already in use.
Root Cause:
The error is due to the systemd-resolved service holding Port 53, which FakeNet also needs to use.
Steps to Resolve Port Conflict and Configure FakeNet
Verify Network Route:
Ensure a valid network route is established:
Ping an Internet Address to verify connectivity.
If there are no responses, check and configure your VM network settings. The default setting is usually NAT mode.
Check the system's IP address using the
ip
command:If necessary, request a valid IP address by renewing DHCP:
Disable
systemd-resolved
Service:To free up Port 53 for FakeNet, disable the
systemd-resolved
service:
Edit Network Manager Configuration:
Modify the Network Manager's configuration file:
Open the file for editing:
Add the following line under the
[main]
section:Save the changes (Ctrl + X, then Y, and press Enter).
Recreate the
resolv.conf
File:Delete the existing
resolv.conf
file:Recreate
resolv.conf
as a symbolic link to the file generated bysystemd-resolve
:
Restart Network Manager Service:
Reboot the system or restart the Network Manager service to apply the changes:
Verify Internet Connection: Ping an address to ensure connectivity wasn't disrupted.
Run FakeNet:
After resolving the port conflict and network issues, you can now run FakeNet:
Test FakeNet:
Visit any website to check if it returns FakeNet's default page.
Handling the Multi-Host Network Mode Issue
Default Behavior:
In Linux, FakeNet defaults to multi-host mode, which may cause it to only log requests without responding with fake data.
Solution: Change to Single Host Mode:
To change the network mode to single host:
Open the configuration file (
default.ini
):Locate the
network_mode
field and set it tosingle_host
:Save and close the file.
Rerun FakeNet:
Run FakeNet again and test by visiting a website to see if it now properly returns FakeNet's default page.
Exiting FakeNet:
To exit FakeNet, press Ctrl + C.
Last updated