Nmap lab IDS/IPS evasion issue

I’m stuck on a lab for Nmap’s Firewall and IDS/IPS Evasion, any help would be appreciated.
I’m trying to spoof the scan’s source IP address, just as it’s discussed in the module, and I keep getting the nmap error “failed to determine route”

Here is my scan and result:

$ sudo nmap 10.129.208.213 -n -Pn -O -S 10.129.208.200 -e tun0
Starting Nmap 7.92 ( https://nmap.org ) at 2022-03-24 08:12 GMT
setup_target: failed to determine route to 10.129.208.213
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.21 seconds

I’m guessing the issue has to do with the interface I’ve specified with the -e flag, however I’ve tried all available interfaces (tun0, eth0, eth1) and all produce the same result. What am I doing wrong? Thanks for any help.

Note: I can scan the address 10.129.208.213 just fine, but whenever I use the -S to spoof I get this error

1 Like

No ideas why I cannot spoof the source IP address?

Which is the lab that you stuck (easy, medium or hard)?
I don’t remember that I used a manual spoof address (like with “-S” flag) to solve those nmap labs. Try only use a decoy scan with random ip address.

1 Like

It’s the easy lab.
I think I was going about it the wrong way, but the -D flag definitely works as it should, thanks.
For some reason the -S flag doesn’t work in those lab virtual machines

did u solved the problem bro? I met the same question ,couldn’t find a way out

i know this is an old seemingly dead post, but you are not alone. Same issue here. whether you openvpn your connection and try exact command as on screen or in pwnbox it says unreachable. whats weird is that i know it routed with vpnconfig on the same subnet so it should be reachable. i havent successfully been able to use that command yet. im sure any new ppl on here are going to try that with the same result

I think it exists somewhere else on this forum similar discussion about this exercise. In my case, I had to respawn the target a few times. It worked eventually. It seems to be a bug or misconfiguration.

Yes I solved the box and went on to Metasploit module. Nice content.

However, on all my configurations cannot for the life of me to get nmap -S to work at all tried all sorts of things posted on the net, and academy. I’m guessing it has something to do with the vpn config. I see its clearly routed the whole subnet so it shoul be reachable but with that option ticked i cannot reach host.

1 Like

After I turned off my VPN, it worked.