-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route doesn't seem to work :( #7
Comments
Not sure what's going on there, but if you can ping everything 192.168.56.0/24 from your VirtualBox host (192.168.1.42), but not from outside the host, then it sounds like a routing thing. IP routing is enabled by the script:
What does "ip addr" output? |
I have the same issue. But I can only ping 192.168.56.1. Other than that I can't reach it. |
Hi, First enable IP forwarding in Ubuntu:
Then add the route: Also you need to allow and masquerade the traffic:
After this I ran nmap from my kali machine and it worked. |
I have used bare metal Ubuntu 22.0.4 install. With a wifi-card to a router with192.168.1.1 using DHCP
My ubuntu install is on 192.168.1.42 (ssh works from windows/kali)
I have another box that is physically connected to 192.168.1.67 through Virtualbox (bridged) on another physical PC (kali)
In the end I get:
"Deployment succeeded, your lab is now up and running on the 192.168.56.0/24 network", and surely I can ping things inside from the SSH sessions or kali to 192.168.1.42
Now I've added the route
sudo ip route add 192.168.56.0/24 via 192.168.1.42 (in kali)
From kali I get ping response from 192.168.1.42(ubuntu), but not 192.168.56.10 for example,.
cme smb 192.168.56.0/24 doesn't get any responses.
nmap 192.168.56.0/24 is dead, except 192.168.56.1
So I am thinking the problem is within the ubuntubox somehow. I've tried lots of manulas and routing, opening and disabling firewalls etc...
Do I need to attack my network from the ubuntubox?
It seems 192.168.56.1 is "router in NAT mode"
┌──(kali㉿kali)-[~]
└─$ sudo ip route add 192.168.56.0/24 via 192.168.1.42
┌──(kali㉿kali)-[~]
└─$ ping 192.168.56.10
PING 192.168.56.10 (192.168.56.10) 56(84) bytes of data.
^C
--- 192.168.56.10 ping statistics ---
2 packets transmitted, 0 received, 100% packet loss, time 1006ms
┌──(kali㉿kali)-[~]
└─$ ping 192.168.56.1
PING 192.168.56.1 (192.168.56.1) 56(84) bytes of data.
64 bytes from 192.168.56.1: icmp_seq=1 ttl=64 time=1.45 ms
64 bytes from 192.168.56.1: icmp_seq=2 ttl=64 time=1.54 ms
^C
--- 192.168.56.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1002ms
rtt min/avg/max/mdev = 1.449/1.494/1.540/0.045 ms
┌──(kali㉿kali)-[~]
└─$ sudo ip route add 192.168.56.0/24 dev eth0 via 192.168.1.42
RTNETLINK answers: File exists
┌──(kali㉿kali)-[~]
└─$ sudo ip route add 192.168.56.0/24 dev eth0 via 192.168.51.1
Error: Nexthop has invalid gateway.
┌──(kali㉿kali)-[~]
└─$
The text was updated successfully, but these errors were encountered: