Boot SPARC server behind NAT over the Internet from VM also behind NAT

From Aram's Wiki
Revision as of 16:36, 7 June 2018 by Aram (talk | contribs) (Instructions)
Jump to: navigation, search


Topology

   +----------------+
   |                |
   |  SPARC server  |
   |                |
   +-+--------------+
     | 192.168.0.60
     |
     |
     |                             +--------------------------------------+
   +-+------+                      |                                      |
   |        |        192.160.0.1/24|     Router #1                        |
   | Switch +----------------------+                                      |
   |        |                      |     84.112.126.72 -> 192.160.0.100   |
   +-+------+                      |                                      |
     |                             +------+-------------------------------+
     |                                    | 84.112.126.72  (vienna.mgk.ro)
     |                                    |
     | 192.168.0.100                      |
   +-+--------------+                     |
   |                |         +-----------+
   |      z800      |         |
   |                |         |
   +----------------+         |
                              |                          Site #1 (Vienna)
                              v
+----------------------+  Internet  +--------------------------------------+
                              ^
                              |                          Site #2 (Sibiu)
              +---------------+
              |
  xx.xx.xx.xx |
 +------------+--+                                     +--------------------+
 |               | 172.20/20               172.20.8.xx |                    |
 |   Router #2   +---+                      +----------+ Router #3 (VMware) |
 |               |   |                      |          |                    |
 +---------------+   |                      |          +------------------+-+
                     |     +----------+     |                172.16.24/24 |
                     |     |          |     |                             |
                     +-----+  Switch  +-----+                             |
                           |          |                                   |
                           +----+-----+                                   |
                                |                                         |
                                |                                         |
                                | 172.20.8.yy               172.16.24.128 |
                           +----+-----+                      +------------+-+
                           |          |                      |              |
                           |  Laptop  |                      |  Solaris VM  |
                           |          |                      |              |
                           +----------+                      +--------------+

Strategy

The idea is that we have access through ssh to a machine in the same LAN as the server (z800 in the diagram above). We want to make the SPARC server think it's booting from this machine, while we're in fact using ssh port forwarding to forward inbound connection to that machine to our VM.

Instructions

Install Solaris 11 (amd64) in VMware, on laptop.

Set-up SPARC AI server:

vm# pfexec installadm create-service -a sparc

Make a client-specific AI config:

cp /etc/netboot/{system,webboot}.conf /etc/netboot/cl.ie.nt.ip 

Edit /etc/netboot/client-ip/webboot.conf to reference client (e.g. behind NAT) IPs.

Set-up remote port forwarding:

laptop$ ssh -S none -NT -R 5555:172.16.24.128:5555 -L 8080:192.168.0.1:80 vienna.mgk.ro

Set-up SPARC machine to netboot using static IP:

ok setenv network-boot-arguments host-ip=192.168.0.60,router-ip=192.168.0.1,subnet-mask=255.255.255.0,file=http://192.168.0.100:5555/cgi-bin/wanboot-cgi
ok boot net