Forum Thread: Virtual Box Setup for Using Kali Linux

I've been working on setting up kali linux on virtualbox everything related to the setup is correct

But I need to configure kali linux to work over WAN , Because most of the exploits or attacks work on LAN ( My network ) , How is it possible to setup VirtualBox and kali linux to work over WAN , Also I'm aware that i should attempt portforward , but couldn't get it to work anyway.

I'm still learning and practicing so go easy on me
Thanks in advance
Respect :D

41 Responses

The setup is identical to work on WAN as LAN but you need to configure portforwarding on your router.

I'm aware that i should portforward on my router already did
i portforwarded port 80 but couldn't get anything to work over wan

Want to ask something if you don't mind !
What is the command for listening on a port ? so when i check if it's open the website shows it's open

One more thing , what is better to have a static ip or dynamic ?
And how to set it up without any issues on kali using virtual box

Describe your setup better and maybe someone can help you. If you have your virtual environment setup properly then it's like OTW said "setup is identical".

Alright , sorry for not describing the whole situation my bad
VirtualBox settings :
General
Running kali linux with Debian (64bit)
System
base Memory: 4758 Mb
Processors : 2
Execution Cap: 1%
Boot Order : CD/DVD, Hard disk
Display
Acceleration: VT-x/AMD-V, Nested Paging , PAE/NX
Video Memory : 12 MB
Acceleration : 3D
Remote Desktop Server : Disabled
Video Capture : Disabled
Network
I have 3 adapters
1: attached to NAT
2: attached to Bridged Adapter
3: attached to Host-only Adapter
This is my Virtual Box settings
when i start kali i open gufw firewall and open ports there
I also open ports on my router

but i have a question in virtual Box NAT there should be portforwarding too but what should be the host ip and the guest ip ?

Also If i want to use SET I should create a Web Server right ?

Change your network adapter to bridged mode for kali, then renew your DHCP lease to ensure you got a new lease from your router and not the virtual host. Sometimes VM's will try to hold the old lease when they are running and you change adapter settings. Then port forward to that address from your router.

I'm not to sure you should setup port forward on virtual box NAT unless absolutely necessary. Traffic can get weird when it's double NAT'ed.

Hope you get my point and if you need me to explain more , I'll certainly will

So you mean when changing to bridged disable the others right ?

Yes, how many adapters do you have on your kali machine?

3 ( NAT, bridged , host only )
Alright I'll disable the rest and inform you guys with the results later on
Thank you very much

I know there are tutorials on the web for setting up all three adapter types in virtual box for a single VM, but truthfully its not necessary and only going to complicate things. The need for multiple adapters (in my opinion) is rare and limited to very specific needs and/or situations.

Yeah I understand !
Thanks !
For using SET , Should I create a web server ?

It depends on what you are trying to do with SET. It will create the necessary setup depending on what you are doing.

if Kali is a bit lagging in virtual box what can i do to reduce the slow performance?

Mmmm... Thanks guys !!!
you did your best thanks for the help appreciate it
it's very interesting these stuff helps me to improve solving problems :)

if my kali on virtual box is a bit lagging how can i improve the performance , I already made the ram higher just in case , but still

Give it more RAM.

How much RAM did you allocate to Kali?

I'm using Harvester Attack on a friend to test it of course with his permission , but the page is not opening with him

what i did is entered my external ip to post back (in this situation isn't there an alternative way so I don't be tracked since it's my real ip )

entered the site
and shortened the ip but he says that the link is not responding
What did i do something wrong ?
Then should i create a web server ?
Thanks

SET will setup the web server for you in the attack, even if its not already running. If "your friend" says its not responding then he/she cannot reach your site. You need to determine:

  1. if the site is running. Try visiting it on you LAN
  2. if the traffic is being forwarded to kali from your router. Try running a packet tracer.
  3. If he/she is actually trying to connect to your site. Again packet tracer.

Mmm... That make sense
The site is Running , i checked it on my lan and it's working
, the packet tracer should be a windows application or in kali ?

Because i found one on windows
Cisco packet tracer

Sorry my wording may be off. Cisco packet tracer is used to simulate Cisco environments for learning (good tool for you to learn with though). What I meant was something like wire-shark or tcpdump (packet analyzer).

Oh , no problem ...

Got it then , what are the certain things that i should do or see in either wire-shark or tcpdump? is there is any configuration or setup?

please elaborate if you don't mind :D

Let me explain my thinking. The not responding your buddy is getting means they are not able to reach your web server. If you can access it on your LAN we know that it is up and running. This leaves us with either your buddy is not trying to access you but something else or the traffic is not reaching your web server from your router when your buddy is trying to reach you.

Have your buddy try to reach you by IP address not the shortened version (http://8.26.65.10/ )

While he/she is doing that run your packet capture (either on kali itself or another machine on your LAN or both!). What you should see is traffic comming from your router to your kali box (from some random port to the port you setup in your port forward).

Side note: there are other possible issues but they are highly unlikely. If you need the comands for the packet capture just let me know.

Yes Give me the commands
I didn't fix the issue yet :\

He is getting : Can't Connect , the link is not working . to be specific

Mmmm... noticed something off ! when I sent him the link as you said with my external ip instead of my shortened version i tried to open it on my ipad i get the same issue he is getting Can't connect , the link isn't working !! , while when i open the shortened version it opens and there is notification in Set

So that tells us the issue is most likely either the NAT rule you setup or the network adapter you setup in virtual box (or something else is blocking the traffic on your LAN) assuming your using the proper public IP address.

In Kali go to Applications > Kali Linux > Sniffing/Spoofing > Network Sniffers > Wireshark

Once it opens select your network adapter (eth0 on mine) then select capture options. Enter host followed by your kali linux machine IP address. For example host 192.168.1.2 and then hit start. Try to access your website from the public IP address and watch the packets.

I can see the source and destination exchanging between my kali ip and my external ip : some TCP, ARP, Http
I'll try it with a friend again and see what happens

What would be the solution for this annoying issue?

it may be really simple to solve it but I'm confused

I was just re-reading your comments. So let me get this straight. When you try to access the web server via your public IP address it doesn't work. But when you try to access the web server via the shortened link it does work? Are you sure you are using the correct IP address? Is it the same IP as when you look it up somewhere like http://whatismyipaddress.com ?

You friend cannot access the website regardless of what method they use (IP address or shortened link). Are you sure you have the port forwarding working correctly and/or firewall isn't blocking his/her traffic?

Your packet capture seems to show that traffic is moving to and from your web server and router. Was this capture done when you used the shortened link or the public IP address?

Sorry for late reply but had some things busy with
No that happened once only , I can now open both shortened and the ip
sorry if i miss leaded you, Anyway... My Portforward process as far as i know is correct but I'm not 100% sure
what i did is :
1-Port forward 80 and 443 on my router to kali's ifconfig ip
2-Port forward the same on my firewall
3- opened gufw and enabled the portforwading
thats what i did but i don't know what the hell is incorrect

but im concerend about the virtual box portforwarding ? should i do it too , I mean NAT forwarding on virtual box since there is an option for it.

Man Thanks for the help , I appriciate your time and hope we can figure out a solution for this problem and maybe other people can get help too

So it works just fine for you but not your friend?
1-Port forward 80 and 443 on my router to kali's ifconfig ip
Double check your port forward rules if your not 100% sure look it up http://portforward.com/
2-Port forward the same on my firewall
What firewall is this? Your host, vm, network? Try dissabling briefly to test. Then re-enable it when your done.
3- opened gufw and enabled the portforwading
Try dissabling this also, you can re-enable it when your done.

The only other advice I think off giving you is to try starting completly over. It really only takes a couple minutes to setup and run (I did it eirlier to make sure I wasn't missing something). I truly think the traffic is either being blocked or not forwarded properly in your NAT or multiple firewall's.

1- Alright
2- My computer's firewall
3- I'll try again and inform you
thanks

this video shows complete procedure to configure kali settings in vmware. the process for install kali is very easy process and only needs proper guidence and some small time. a small mistake can harm your laptop. you can follow this video. video made in may 2015 so there are less chances of error and tested on windows platform. please go to

I'm on a Kali Linux 2.0 Host with a Virtualbox guest WinXP. I'm attempting to use Metasploit's smb exploit

I get the unreachable connection timed out error. I've scoured the net for a solution but can't find one. I've tried all adaptors. I'm going with NAT with port forwarding as it seems Metasploit smb exploit uses port 445.

The port forwarding rule I have is TCP Host IP 127.0.0.1 Host port (tried many incl 80 and 445) Guest IP 10.0.2.15, Guest port (tried many incl 80 and 445) . . There's no firewall on winxp. I tried to NMAP and ping the guest but all ports are blocked. I'm at a real loss. I currently have my wifi adaptor wlan0mon enabled and are connected to the net.

Please help.

Cheers.

Hi Guys! Is there still someone who can help me with my network setting?

Share Your Thoughts

  • Hot
  • Active