如果EVE-NG Community在ESXi上無法連上internet,可以試下以下文章
Problem
I did an article a while back on doing this with UNL, so I thought I’d
revisit it today for EVE-NG. I really like EVE-NG, for proof of concept
work, testing, and just learning new products I cant think of any
product better.
But what if you want to connect your labs to the outside world?
Solution
In all honesty a lot of this article you can skip, I’m just showing you
what’s going on down at the Linux level (so you can be sure yours will
be OK).
I’m assuming you already have EVE-NG installed and some images in it,
and know how to create a lab, and that you want to connect that lab to
the internet.
Unlike UNL, EVE-NG will deploy with only one vNIC, (below I’m using vSphere 6), so to keep things nice and simple I’m just going to add one more;
VMXNet3 is fine, just make sure it’s connected to the correct port-group.
Note: You can probably skip down to allowing promiscuous mode below. As the good folk at EVE-NG have configured all the hard stuff for you!
SSH into your EVE-NG server > log on as the root user, and make sure it can see BOTH network cards, with the following command;
ifconfig -a | grep ^eth
Above you can see the original eth0, and the one I just added eth1.
You probably already have nano installed, (it’s a text editor). But just in case, run the following command;
apt-get install nano
Use nano to edit/view the network card settings;
nano /etc/network/interfaces
Scroll down to the settings for eth1 and make sure it is tied to, (bridged to) pnet1 (as below). Repeat for any additional network cards.
To exit nano Press CTRL+X, (then if you have made any changes save them).
You can also see a summary of bridged interfaces with the following command;
brctl show/box]
Enable Promiscuous Mode
Your Hyper Visor (VMware) needs to be able to see traffic from your
EVE-NG devices, coming out though the vNIC we added earlier, that means a
lot of MAC addresses are going to be coming from the MAC address of
that vNIC. By default VMWare will block that. so we need to enable
promiscuous mode on the port-group that we connected to earlier, (mine was called VM Network).
If you are using the older VMware (Fat) client, see the link at the bottom of the page for the older UNL article.
Edit the port group;
On the Security tab > Tick ‘Override’, and set it to ‘Accept’ > OK.
Add Cloud Objects to EVE-NG
Above, (if you remember) the vNIC (eth1) was bridged to pnet1. These
used to be labelled pnet1, pnet2, etc. Now they are labelled Cloud1,
Cloud2, etc.
In your lab workspace add a ‘Network’ object.
Select Cloud1 (remember this is mapped to pnet1, which is bridged to
eth1.). You may want to change the name from Net, to something like
‘Internet’.
Connect a device to it, (I’m using a router, because they are quick and easy to setup).
My Network has DHCP on it, so my router picked up an IP from my LAN, and
once I’d given it a default route, I now have full internet access from
the lab.
No comments:
Post a Comment