TJMNQ Gateways
Background
The gateways act as both a router and a print server.
They usually consist of a PC that has:
- 1-2 parallel port (number of ports depends on printers)
- 2 ethernet ports
- 1 serial port
The gateway will be directly connected to an ADSL modem. In almost all cases, Mackay is the exception, the modem will be in bridge mode. This means that the modem does nothing more than convert Ethernet frames into xDSL frames. It is up to the gateway to setup the PPP link to the ISP. This includes authentication.
In the case of Mackay, the gateway will simply sit in between the modem/router and the rest of the LAN.
TJMNQ Gateway computers are now only used a means of communicating to the PDEs/Printers
Setting up a gateway computer
- Install linux. Almost all distro/version should be fine. Should install updates
- Create ccc user. Password should be the same as the other gateways.
Edit the following line in /etc/sysconfig/network
HOSTNAME=<location>_gw
# cd /etc/sysconfig/network_scripts
Edit the file ifcfg-<external interface> to include the following lines
ONBOOT=YES BOOTPROTO=dhcp IPADDR=192.168.1.1 NETMASK=255.255.255.0
Edit the file ifcfg-<internal interface> to include the following lines
ONBOOT=YES BOOTPROTO=static IPADDR=192.168.1.2 NETMASK=255.255.255.0
Edit /etc/hosts
# All the .tjm.com.au addresses are public IP # (which are usually not accessible, other than ssh) 165.228.233.119 cairns.tjm.com.au 165.228.233.106 mtisa.tjm.com.au 165.228.226.142 townsville.tjm.com.au 165.228.5.40 darwin.tjm.com.au # The VPN addresses are only for gateway machines 192.168.201.1 townsville_gw head-office.vpn 192.168.201.2 cairns_gw cairns_gw.vpn 192.168.201.3 mtisa_gw mtisa_gw.vpn 192.168.201.4 darwin_gw darwin_gw.vpn 192.168.201.5 mackay_gw mackay_gw.vpn
Setup the VPN to townsville_gw. See http://robin.crecom.com.au/knowledge/linux/vpn%20setup.htm
Edit /etc/ppp/ip-up.local
echo 1 > /proc/sys/net/ipv4/conf/<internal interface>/proxy_arp route del townsville.localnet gw townsville_gw route add townsville.localnet gw townsville_gw
- Setup the firewall. Copying Darwin's firewall and editing the appropriate variables should be enough.
- Setup the printers:
- invoice - Network printer. Needs overlay
- invoicep - Network printer. Plain paper
- label - Parallel printer. Zebra TLP2824
- Setup cups-lpd. This is needed so that LPD (Control server in Townsville) can talk to CUPS on the gateway.
- Install Cups-Lpd. For Fedora Core 6,
# yum install cups-lpd
Edit /etc/xinet.d/cups-lpd
disable = no
- Restart xinetd
# /etc/init.d/xinetd restart
- Install Cups-Lpd. For Fedora Core 6,
- Setup the printers in Control server (Townsville)
Add the following to /etc/printcap.local
<location>_invoice:\ :lp=:rm=<location>_gw:rp=invoice:sd=/var/spool/lpd/<location>_invoice: <location>_invoicep:\ :lp=:rm=<location>_gw:rp=invoicep:sd=/var/spool/lpd/<location>_invoicep: <location>_label:\ :lp=:rm=<location>_gw:rp=label:sd=/var/spool/lpd/<location>_label:- Restart Lpd
# /etc/init.d/lpd restart
- Add the new printers to Control
> prnaad
- Setup the netserial
Transfer a copy of netserial from another TJMNQ gateway. It should be located in /usr/local/bin/
Edit /etc/inittab
ns0:2345:respawn:/usr/local/bin/netserial 4001 19200,n,8,1 >> /var/log/netserial.log 2>&1
- Reload inittab
# init q
Setup the <location>_pde printer in Control (Townsville)
(Townsville)> prnaad
Test EVERYTHING !!