Networking » History » Version 4
Anonymous, 09/28/2007 10:42 AM
| 1 | 1 | Anonymous | |
|---|---|---|---|
| 2 | 4 | Anonymous | h1. Newtorking |
| 3 | 4 | Anonymous | |
| 4 | 4 | Anonymous | |
| 5 | 4 | Anonymous | |
| 6 | 4 | Anonymous | h2. Network Configuration |
| 7 | 4 | Anonymous | |
| 8 | 1 | Anonymous | Make the following changes on the master node and each slave node: |
| 9 | 1 | Anonymous | |
| 10 | 4 | Anonymous | * Modify _/etc/sysconfig/network_ in order to enable networking, set the hostname, and disable the Zero Configuration Networking: |
| 11 | 4 | Anonymous | <pre> |
| 12 | 1 | Anonymous | NETWORKING=yes |
| 13 | 1 | Anonymous | NETWORKING_IPV6=no |
| 14 | 1 | Anonymous | HOSTNAME=[Add Hostname] |
| 15 | 1 | Anonymous | NOZEROCONF=yes |
| 16 | 4 | Anonymous | </pre> |
| 17 | 1 | Anonymous | |
| 18 | 4 | Anonymous | * Modify _/etc/sysconfig/networking/devices/ifcfg-eth0_ in order to configure the internal network interface (_eth0_): |
| 19 | 4 | Anonymous | <pre> |
| 20 | 1 | Anonymous | DEVICE=eth0 |
| 21 | 1 | Anonymous | TYPE=Ethernet |
| 22 | 1 | Anonymous | ONBOOT=yes |
| 23 | 1 | Anonymous | BOOTPROTO=static |
| 24 | 1 | Anonymous | HWADDR=[Add MAC Address] |
| 25 | 3 | Anonymous | IPADDR=[Add Internal IP Address] |
| 26 | 1 | Anonymous | BROADCAST=192.168.199.255 |
| 27 | 1 | Anonymous | GATEWAY=192.168.199.1 |
| 28 | 1 | Anonymous | NETWORK=192.168.199.0 |
| 29 | 1 | Anonymous | NETMASK=255.255.255.0 |
| 30 | 1 | Anonymous | MTU=9000 |
| 31 | 4 | Anonymous | </pre> |
| 32 | 4 | Anonymous | The MTU value enables _jumbo frames_ and a better performance on the internal network. |
| 33 | 1 | Anonymous | |
| 34 | 4 | Anonymous | * Modify _/etc/sysconfig/networking/devices/ifcfg-eth1_ in order to configure the external network interface (_eth1_): |
| 35 | 4 | Anonymous | <pre> |
| 36 | 1 | Anonymous | DEVICE=eth1 |
| 37 | 1 | Anonymous | TYPE=Ethernet |
| 38 | 1 | Anonymous | ONBOOT=yes |
| 39 | 1 | Anonymous | BOOTPROTO=static |
| 40 | 1 | Anonymous | HWADDR=[Add MAC Address] |
| 41 | 1 | Anonymous | IPADDR=[Add External IP Address] |
| 42 | 1 | Anonymous | BROADCAST=128.243.21.255 |
| 43 | 1 | Anonymous | GATEWAY=128.243.21.1 |
| 44 | 1 | Anonymous | NETWORK=128.243.21.0 |
| 45 | 1 | Anonymous | NETMASK=255.255.255.0 |
| 46 | 4 | Anonymous | </pre> |
| 47 | 1 | Anonymous | |
| 48 | 4 | Anonymous | * Add a default gateway and routes to the internal and external networks to the Routing Table (if not done automatically yet): |
| 49 | 4 | Anonymous | <pre> |
| 50 | 1 | Anonymous | /sbin/route add -net 192.168.199.0 netmask 255.255.255.0 dev eth0 |
| 51 | 1 | Anonymous | /sbin/route add -net 128.243.21.0 netmask 255.255.255.0 dev eth1 |
| 52 | 1 | Anonymous | /sbin/route add default gw 128.243.21.1 dev eth1 |
| 53 | 4 | Anonymous | </pre> |
| 54 | 1 | Anonymous | |
| 55 | 4 | Anonymous | * Restart the network. Enter at the command line of the master node and each slave node: |
| 56 | 4 | Anonymous | <pre> |
| 57 | 1 | Anonymous | /sbin/service network restart |
| 58 | 4 | Anonymous | </pre> |
| 59 | 1 | Anonymous | |
| 60 | 1 | Anonymous | |
| 61 | 1 | Anonymous | |
| 62 | 4 | Anonymous | h2. Firewall |
| 63 | 4 | Anonymous | |
| 64 | 4 | Anonymous | The only services that the master node will accept connections for from the external interface (_eth0_) will be the web server (port 80 for production and port 8080 for test) and ssh (port 22). |
| 65 | 4 | Anonymous | |
| 66 | 4 | Anonymous | * Check _/etc/sysconfig/iptables_ on the master node for the following lines: |
| 67 | 4 | Anonymous | <pre> |
| 68 | 1 | Anonymous | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT |
| 69 | 1 | Anonymous | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT |
| 70 | 1 | Anonymous | -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT |
| 71 | 4 | Anonymous | </pre> |
| 72 | 1 | Anonymous | |
| 73 | 1 | Anonymous | |
| 74 | 4 | Anonymous | All network traffic using the internal network interface (_eth0_) is trusted and considered to be secure. Thus, no firewall is needed. |
| 75 | 1 | Anonymous | |
| 76 | 4 | Anonymous | * Modify _/etc/sysconfig/iptables_ on the master node and on each slave node. Add |
| 77 | 4 | Anonymous | <pre> |
| 78 | 1 | Anonymous | -A RH-Firewall-1-INPUT -i eth0 -j ACCEPT |
| 79 | 4 | Anonymous | </pre> |
| 80 | 1 | Anonymous | directly after |
| 81 | 4 | Anonymous | <pre> |
| 82 | 1 | Anonymous | -A RH-Firewall-1-INPUT -i lo -j ACCEPT |
| 83 | 4 | Anonymous | </pre> |
| 84 | 1 | Anonymous | |
| 85 | 1 | Anonymous | |
| 86 | 4 | Anonymous | * Make the firewall start at bootup. Enter at the command line of the master node and each slave node: |
| 87 | 4 | Anonymous | <pre> |
| 88 | 1 | Anonymous | /sbin/chkconfig --add iptables |
| 89 | 1 | Anonymous | /sbin/chkconfig iptables on |
| 90 | 4 | Anonymous | </pre> |
| 91 | 1 | Anonymous | |
| 92 | 4 | Anonymous | * Start the firewall. Enter at the command line of the master node and each slave node: |
| 93 | 4 | Anonymous | <pre> |
| 94 | 1 | Anonymous | /sbin/service iptables restart |
| 95 | 4 | Anonymous | </pre> |
| 96 | 1 | Anonymous | |
| 97 | 1 | Anonymous | |
| 98 | 1 | Anonymous | |
| 99 | 4 | Anonymous | h2. Host Name Resolution |
| 100 | 1 | Anonymous | |
| 101 | 4 | Anonymous | |
| 102 | 4 | Anonymous | |
| 103 | 4 | Anonymous | h3. Internal Host Name Resolution |
| 104 | 4 | Anonymous | |
| 105 | 4 | Anonymous | As each node consists of two network interfaces (_multihomed host_), the host name resolution must be configured correctly in order to prioritize the internal, trusted network for communication between different nodes. |
| 106 | 4 | Anonymous | |
| 107 | 4 | Anonymous | * The official hostname for each (master and slave) node must be set to the _internal_ name of the machine in _/etc/sysconfig/network_ (e.g. for the master node): |
| 108 | 4 | Anonymous | <pre> |
| 109 | 1 | Anonymous | HOSTNAME=master01.procksi.local |
| 110 | 4 | Anonymous | </pre> |
| 111 | 1 | Anonymous | |
| 112 | 4 | Anonymous | * Modify _/etc/hosts_ in order to configure the host name resolution (e.g. the master node): |
| 113 | 4 | Anonymous | <pre> |
| 114 | 1 | Anonymous | 127.0.0.1 master01.procksi.local master01 localhost.localdomain localhost |
| 115 | 4 | Anonymous | </pre> |
| 116 | 1 | Anonymous | and alter the line for each slave node (slave01 ... slaveXX) accordingly. |
| 117 | 1 | Anonymous | |
| 118 | 4 | Anonymous | * Modify _/etc/hosts_ on the master node and each slave node in order to specify IP addresses and host names of the [[ProCKSI]] cluster: |
| 119 | 4 | Anonymous | <pre> |
| 120 | 1 | Anonymous | 192.168.199.1 master01.procksi.local master01 m01 |
| 121 | 1 | Anonymous | 192.168.199.11 slave01.procksi.local slave01 s01 |
| 122 | 1 | Anonymous | 192.168.199.12 slave02.procksi.local slave02 s02 |
| 123 | 1 | Anonymous | 192.168.199.13 slave03.procksi.local slave03 s03 |
| 124 | 1 | Anonymous | 192.168.199.14 slave04.procksi.local slave04 s04 |
| 125 | 4 | Anonymous | </pre> |
| 126 | 1 | Anonymous | |
| 127 | 4 | Anonymous | * Modify _/etc/host.conf_ so that local settings in _/etc/hosts_ take precedence over DNS queries: |
| 128 | 4 | Anonymous | <pre> |
| 129 | 1 | Anonymous | order hosts,bind |
| 130 | 4 | Anonymous | </pre> |
| 131 | 1 | Anonymous | |
| 132 | 4 | Anonymous | * Modify _/etc/nsswitch.conf_ so that local settings in _/etc/hosts_ take precedence over DNS queries: |
| 133 | 4 | Anonymous | <pre> |
| 134 | 1 | Anonymous | Hosts: files dns |
| 135 | 4 | Anonymous | </pre> |
| 136 | 1 | Anonymous | |
| 137 | 4 | Anonymous | * Modify _/etc/resolve.cof’’ so that host names other then those of the [[ProCKSI]] cluster can be resolved: |
| 138 | 4 | Anonymous | <pre> |
| 139 | 1 | Anonymous | search cs.nott.ac.uk |
| 140 | 1 | Anonymous | nameserver 128.243.21.19 |
| 141 | 1 | Anonymous | nameserver 128.243.20.6 |
| 142 | 4 | Anonymous | </pre> |
| 143 | 1 | Anonymous | |
| 144 | 1 | Anonymous | |
| 145 | 1 | Anonymous | |
| 146 | 1 | Anonymous | |
| 147 | 4 | Anonymous | h3. External Host Name Resolution |
| 148 | 4 | Anonymous | |
| 149 | 4 | Anonymous | In order to allow other computers on the Internet to connect to [[ProCKSI]]’s master node, the following settings must be made with the provider for the URL and email forwarding. |
| 150 | 4 | Anonymous | |
| 151 | 4 | Anonymous | * The primary and secondary DNS servers must be set as follows: |
| 152 | 4 | Anonymous | <pre> |
| 153 | 1 | Anonymous | Primary ns1.iprimus.com.au |
| 154 | 1 | Anonymous | Secondary ns2.iprimus.com.au |
| 155 | 4 | Anonymous | </pre> |
| 156 | 1 | Anonymous | |
| 157 | 4 | Anonymous | * The following changes must be made manually in _Advanced DNS settings_ in order to allow a correct URL forwarding: |
| 158 | 4 | Anonymous | <pre> |
| 159 | 1 | Anonymous | CNAME *.procksi.net procksi.cs.nott.ac.uk. |
| 160 | 1 | Anonymous | CNAME *.procksi.org www.procksi.net. |
| 161 | 1 | Anonymous | CNAME *.procksi.com www.procksi.net. |
| 162 | 1 | Anonymous | CNAME *.procksi.info www.procksi.net. |
| 163 | 4 | Anonymous | </pre> |
| 164 | 1 | Anonymous | |
| 165 | 4 | Anonymous | * The following changes must be made manually in _Advanced DNS settings_ in order to allow a correct email forwarding: |
| 166 | 4 | Anonymous | <pre> |
| 167 | 1 | Anonymous | MX @.procksi.net mailhost.planetdomain.com 10 |
| 168 | 4 | Anonymous | </pre> |