Answer the question
In order to leave comments, you need to log in
How to properly configure the local LEMP server network?
Available:
Host OS: Linux Mint 18.1
Guest OS: Debian GNU/Linux 8.7 (jessie) - installed on VirtualBox
Required:
[email protected]:~# ifconfig -a
eth0 Link encap:Ethernet HWaddr 08:00:27:e1:f4:73
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fee1:f473/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:40 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5353 (5.2 KiB) TX bytes:16423 (16.0 KiB)
eth1 Link encap:Ethernet HWaddr 08:00:27:95:2b:a4
inet addr:192.168.56.10 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe95:2ba4/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1457 errors:0 dropped:0 overruns:0 frame:0
TX packets:1064 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:137550 (134.3 KiB) TX bytes:207150 (202.2 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
В файле /etc/mysql/my.cnf
bind-address = 192.168.56.10
Далее в консоле:
$ mysql -u root
GRANT ALL ON *.* TO 'root'@'%';
exit;
$ sudo service mysql restart
$ ssh [email protected]
Answer the question
In order to leave comments, you need to log in
In this task, in setting up the network, it is simply impossible to "adjust" - it either works or not.
In terms of security, it is theoretically possible to get from the guest system to the host system, but this is usually already from the category of vulnerabilities of the virtualization system itself.
If you are interested in the opportunity in the "network" plan, then the firewall setting will dispel all your fears :)
Use it and don't worry, and most importantly, don't forward unnecessary ports on the router to the static address of the virtual machine.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question