Network tunneling for virtual machines across a wide-area network
Disclosed are systems and methods for exchanging network traffic between a client and a virtual machine running on a physical server. The described system provides a virtual network interface controller (NIC) that emulates access to a physical local area network of the physical server. The described system further includes server-side and client side components of a packet injection layer that exchanges guest network packets between the client and the virtual machine using a communication channel without injecting the guest network packets into the physical local network of the server.
1. A method for exchanging network traffic between a client and a virtual machine, wherein the method comprises:
emulating a virtual network interface controller (NIC) of a virtual machine executing on a physical server, wherein the virtual NIC emulates access to a physical local area network of the physical server;
detecting a guest network packet at the virtual NIC to be transmitted to a client; and
transmitting the guest network packet to the client using a communication channel between the physical server and the client without injecting the guest network packet into the local area network of the physical server.
2. The method of claim 1 , wherein the communication channel between the physical server and the client comprises a wide area network (WAN).
3. The method of claim 1 , further comprising:
establishing the communication channel between a server-side packet injection layer executing on the physical server and a client-side packet injection layer executing on the client.
4. The method of claim 1 , wherein the physical local area network is isolated from network access by the virtual machine.
5. The method of claim 1 , wherein the guest network packet is received by a client-side packet injection layer and is injected into a physical network interface of the client.
6. The method of claim 1 , wherein detecting the guest network packet at the virtual NIC to be transmitted to the client further comprises:
intercepting a request to access a state of the virtual NIC by a network interface driver executing in the virtual machine.
7. A system for exchanging network traffic between a client and a virtual machine, wherein the system comprises:
a physical network interface controller (NIC);
a processor configured to:
emulate a virtual network NIC of a virtual machine corresponding to the physical NIC, wherein the virtual NIC emulates access to a physical local area network of the physical server;
detect a guest network packet at the virtual NIC to be transmitted to a client; and
transmit the guest network packet to the client using a communication channel between the physical server and the client without injecting the guest network packet into the local area network of the physical server.
8. The system of claim 7 , wherein the communication channel between the physical server and the client comprises a wide area network (WAN).
9. The system of claim 7 , wherein the processor is further configured to:
establish the communication channel between a server-side packet injection layer executing on the physical server and a client-side packet injection layer executing on the client.
10. The system of claim 7 , wherein the physical local area network is isolated from network access by the virtual machine.
11. The system of claim 7 , wherein the guest network packet is received by a client-side packet injection layer and is injected into a physical network interface of the client.
12. The system of claim 7 , wherein the processor configured to detect the guest network packet at the virtual NIC to be transmitted to the client is further configured to:
intercept a request to access a state of the virtual NIC by a network interface driver executing in the virtual machine.
13. A non-transitory computer readable medium comprising computer executable instructions for exchanging network traffic between a client and a virtual machine, including instructions for:
emulating a virtual network interface controller (NIC) of a virtual machine executing on a physical server, wherein the virtual NIC emulates access to a physical local area network of the physical server;
detecting a guest network packet at the virtual NIC to be transmitted to a client; and
transmitting the guest network packet to the client using a communication channel between the physical server and the client without injecting the guest network packet into the local area network of the physical server.
14. The non-transitory computer readable medium of claim 13 , wherein the communication channel between the physical server and the client comprises a wide area network (WAN).
15. The non-transitory computer readable medium of claim 13 , wherein the instructions further comprise instructions for:
establishing the communication channel between a server-side packet injection layer executing on the physical server and a client-side packet injection layer executing on the client.
16. The non-transitory computer readable medium of claim 13 , wherein the physical local area network is isolated from network access by the virtual machine.
17. The non-transitory computer readable medium of claim 13 , wherein the guest network packet is received by a client-side packet injection layer and is injected into a physical network interface of the client.
18. The non-transitory computer readable medium of claim 13 , wherein the instructions for detecting the guest network packet at the virtual NIC to be transmitted to the client further comprise instructions for:
intercepting a request to access a state of the virtual NIC by a network interface driver executing in the virtual machine.