An example of working port-forwarding configuration » History » Version 12
Morgan Beeby, 02/22/2015 10:15 AM
| 1 | 1 | Anchi Cheng | h1. An example of working port-forwarding configuration |
|---|---|---|---|
| 2 | |||
| 3 | 11 | Anchi Cheng | h2. (Paraphrased from description by Brian J. Gibbens) and tested at NRAMM |
| 4 | 1 | Anchi Cheng | |
| 5 | Local network (192.168.xxx.xxx in this example) can not be accessed directly through |
||
| 6 | 5 | Anchi Cheng | institute network that has internet access before port forwarding. |
| 7 | 1 | Anchi Cheng | |
| 8 | 11 | Anchi Cheng | h2. The computer hosts involved in this port-forwarding configuration listed by hostname and operation system in ( ): |
| 9 | 1 | Anchi Cheng | |
| 10 | 10 | Anchi Cheng | # *ScopePC* (Windows) - The computer controlling the microscope |
| 11 | ** connected only to local network |
||
| 12 | 1 | Anchi Cheng | ** Static local IP addresses (192.168.200.99 in this example) is set to this host. |
| 13 | 10 | Anchi Cheng | # *SupportPC* (Windows) - The computer provided by FEI to protect *ScopePC* while allow RAPID system support from them through internet. |
| 14 | 1 | Anchi Cheng | ** Two network cards are on this computer. |
| 15 | 10 | Anchi Cheng | ** Local network Static IP address (192.168.200.100 in this example) |
| 16 | ** Outbound institute network Static IP address (137.131.204.250 in this example) |
||
| 17 | 11 | Anchi Cheng | # *ProcessingLinux* (Linux) - The computer that runs Leginon processing. |
| 18 | 10 | Anchi Cheng | ** Institute network Static IP address (137.131.204.500 in this example) |
| 19 | 11 | Anchi Cheng | # *DatabaseLInux* (Linux) - The computer that runs Leginon database server. In a simpler setup this might be the same computer as the ProcessingLinux as illustrated in the figure below. |
| 20 | ** Institute network Static IP address (137.131.204.700 in this example) |
||
| 21 | 10 | Anchi Cheng | |
| 22 | 1 | Anchi Cheng | !http://emg.nysbc.org/attachments/2484/PortForward.png! |
| 23 | |||
| 24 | 10 | Anchi Cheng | *Ethernet cables should be connected like in the figure above.* |
| 25 | 1 | Anchi Cheng | |
| 26 | 10 | Anchi Cheng | h2. TCP/IP Gateway Settings on *ScopePC* |
| 27 | This should be set to the local IP address of the *SupportPC* like this: |
||
| 28 | !gateway.png! |
||
| 29 | |||
| 30 | h2. Firewall settings on *SupportPC* |
||
| 31 | 11 | Anchi Cheng | ** allow communication to *ScopePC* and *ProcessLinux* and *DatabaseLinux*. |
| 32 | 1 | Anchi Cheng | |
| 33 | 10 | Anchi Cheng | h2. Hosts file addition if needed |
| 34 | 1 | Anchi Cheng | |
| 35 | --Appropriate IP addresses and hostnames added to the hosts files |
||
| 36 | 10 | Anchi Cheng | (C:/WINDOWS/System32/drivers/etc/hosts.txt on Windows PC's and |
| 37 | 1 | Anchi Cheng | /etc/hosts on Linux). |
| 38 | 10 | Anchi Cheng | |
| 39 | 11 | Anchi Cheng | * On *ScopePC* - list hostnames of *SupportPC*, *DatabaseLinux* and *ProcessingLinux* |
| 40 | * On *SupportPC* - list both hostnames of *ScopePC* and *DatabaseLinux* and *ProcessingLinux* |
||
| 41 | * On *ProcessingLinux* and *DatabaseLinux* - list hostname of *SupportPC* in additional to other linux hosts but not *ScopePC* since all communication from *ScopePC* to these through *SupportPC* will appear to come from *SupportPC* |
||
| 42 | 8 | Jim Pulokas | |
| 43 | 10 | Anchi Cheng | h2. Install port forwarding program AUTAPF which allows needed host/port specification on *SupportPC* |
| 44 | |||
| 45 | 11 | Anchi Cheng | The screen shot below shows that case where: |
| 46 | * Port 55555 is opened by legion/laumcher.py (often called Leginon Client") on *ScopePC*, intended to serve data to *ProcessingLinux*. (Fixed port) |
||
| 47 | * Ports 49152 and 49153 are opened by two processes to send/receive data to *ScopePC". (You may need to add more ports in case of blockage. See [[Ports used by Leginon]]) |
||
| 48 | * Port 3306 is dedicated for database connection. (Fixed port) |
||
| 49 | 2 | Anchi Cheng | |
| 50 | 10 | Anchi Cheng | !autapf.PNG! |
| 51 | 2 | Anchi Cheng | |
| 52 | 12 | Morgan Beeby | h1. Another account of setting up port forwarding |
| 53 | |||
| 54 | Based on the experiences of Morgan Beeby at Imperial College London, late 2014 / early 2015. |
||
| 55 | |||
| 56 | In my experience, setting up Leginon on a microscope hidden behind a support PC is relatively straightforwards as long as you are fairly painstaking at each step. Here is my experience distilled from a couple of installations. |
||
| 57 | |||
| 58 | Essentially the support PC is bridging between two networks, both of which it is connected to: the Microscope subnetwork and the wider LAN. |
||
| 59 | |||
| 60 | * Install Leginon server on the CentOS 6.5 server PC |
||
| 61 | * Install Leginon on the microscope PC using a memory stick to transfer files |
||
| 62 | * Work out the following information, and write it down precisely: |
||
| 63 | ** Microscope PC parameters: |
||
| 64 | *** Hostname: run python, and type: |
||
| 65 | **** import socket |
||
| 66 | **** socket.gethostname() |
||
| 67 | *** IP address on the Microscope subnetwork: at C: prompt, type: |
||
| 68 | **** ipconfig/all |
||
| 69 | ** Support PC parameters: |
||
| 70 | *** IP address for the support PC on both the Microscope subnetwork, and wider LAN: at C: prompt, type: |
||
| 71 | **** ipconfig/all |
||
| 72 | ** Leginon server machine parameters: |
||
| 73 | *** Hostname: |
||
| 74 | **** import socket |
||
| 75 | **** socket.gethostname() |
||
| 76 | *** IP address on the wider LAN: |
||
| 77 | **** Type ifconfig in terminal |
||
| 78 | * Install the commercial version of AUTAPF on the support PC |
||
| 79 | * Configure the Microscope PC |
||
| 80 | ** c:/WINDOWS/system32/drivers/etc/hosts |
||
| 81 | *** Add a line with the Support PC's IP address and the Leginon server's hostname, separated by spaces. For example: |
||
| 82 | **** 192.168.1.1 leginon |
||
| 83 | *** Edit c:\Program Files\myami\sinedon.cfg so that 'host' reflects the Leginon server hostname |
||
| 84 | * Configure AUTAPF on the Support PC |
||
| 85 | |||
| 86 | |||
| 87 | |||
| 88 | |_.Local |_.IP |_.Local port |_.Forward to host |_.Forward to port| |
||
| 89 | | Support PC IP (wider network)| 55555 |Microscope hostname |55555| |
||
| 90 | Support PC IP (microscope network) 49153 Leginon hostname 49153 |
||
| 91 | Support PC IP (microscope network) 49154 Leginon hostname 49154 |
||
| 92 | Support PC IP (microscope network) 49155 Leginon hostname 49155 |
||
| 93 | Support PC IP (microscope network) 49156 Leginon hostname 49156 |
||
| 94 | Support PC IP (microscope network) 49157 Leginon hostname 49157 |
||
| 95 | Support PC IP (microscope network) 49158 Leginon hostname 49158 |
||
| 96 | Support PC IP (microscope network) 49159 Leginon hostname 49159 |
||
| 97 | Support PC IP (microscope network) 49160 Leginon hostname 49160 |
||
| 98 | Support PC IP (microscope network) 49161 Leginon hostname 49161 |
||
| 99 | Support PC IP (microscope network) 49162 Leginon hostname 49162 |
||
| 100 | Support PC IP (wider network) 49153 Microscope hostname 49153 |
||
| 101 | Support PC IP (wider network) 49154 Microscope hostname 49154 |
||
| 102 | Support PC IP (wider network) 49155 Microscope hostname 49155 |
||
| 103 | Support PC IP (wider network) 49156 Microscope hostname 49156 |
||
| 104 | Support PC IP (wider network) 49157 Microscope hostname 49157 |
||
| 105 | Support PC IP (wider network) 49158 Microscope hostname 49158 |
||
| 106 | Support PC IP (wider network) 49159 Microscope hostname 49159 |
||
| 107 | Support PC IP (wider network) 49160 Microscope hostname 49160 |
||
| 108 | Support PC IP (wider network) 49161 Microscope hostname 49161 |
||
| 109 | Support PC IP (wider network) 49162 Microscope hostname 49162 |
||
| 110 | Support PC IP (microscope network) 3306 Leginon hostname 3306 |
||
| 111 | |||
| 112 | </nowiki> |
||
| 113 | |||
| 114 | * Configure the Leginon server PC |
||
| 115 | |||
| 116 | 2 | Anchi Cheng | |
| 117 | ______ |
||
| 118 | 1 | Anchi Cheng | |
| 119 | [[Network Configuration| Go up]] |
||
| 120 | |||
| 121 | ______ |