#!/bin/sh

#script to set up network forwarding and make a ppp connection to the psion

if [ -e /proc/sys/net/ipv4/ip_forward ]; then 
  echo 1 > /proc/sys/net/ipv4/ip_forward ]
else
  echo -e "ip_forwarding via proc interface not enabled\n"
  echo -e "you will only be able to talk to this machine, not the net\n"
fi

#need to set up masquerading too on boxes where it is not

if [ -e /proc/sys/net/ipv4/ip_masq ]; then 
  echo 1 > /proc/sys/net/ipv4/ip_masq ]
else
  echo -e "NAT/Masquerading not enabled on this machine\n"
  echo -e "you will only be able to talk to this machine, not the net\n"
fi


#note you will need to change the local:remote IP addresses on this line 
#to match your setup. The local address matches your machine
#the remote one should be a new IP on your local network or in the 
# 'private' address space ranges 192.168.x.x or 10.x.x.x   

pppd /dev/ttyS1 115200 local updetach nocrtscts noauth lock proxyarp 194.70.44.161:194.70.44.152   