iPXE discussion forum

Full Version: How do I chain through VPN?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

I currently have a test network setup comprised of a VPN server on one physical network, and two VPN clients on a different physical network. I need to be able to chain a file from the VPN server from a VPN client.

At the moment, my ipxe file looks like this:
cpuid --ext 29 && set arch x86_64 || set arch i386
param mac0 ${net0/mac}
param arch ${arch}
param platform ${platform}
param product ${product}
param manufacturer ${product}
param ipxever ${version}
param filename ${filename}
isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme

That last line uses a VPN IP. When the computer gets to the OS, the VPN tunnel does exist, so that is not an issue. I temporarily replaced the above code with the script to find all network adapters (https://gist.github.com/robinsmidsrod/3871687) but that only shows net0. Pinging the IP address in PXE results in a timeout.

I'm assuming I need to specify the VPN network adapter and set it, right? If so, how do I do that?
iPXE has no specific support for VPN protocols. If you need to connect through a VPN, you need to set up the VPN connection in the router/gateway for the network where your iPXE clients live. Your iPXE clients then need to connect to an IP address that the router sends through the VPN to your secured network.

iPXE runs before any operating system is loaded, so it doesn't have access to any network adapters provided by your operating system. I would recommend you browse around on http://networkboot.org/ if you need to understand more of the fundamentals of both booting an x86 computer in general and network booting.
Reference URL's