If the Internet had been become popular in the 80s.

Background

It’s 1985 in a parallel universe where Europeon telecoms companies have understood the need to bring down costs and install a new digital communications network based on ISDN.

In parallel Minicomputers and Mainframes are being joined together to better share information between companies and academic institutions using packet switch. They all agree on a information sharing agreemement that mirrors the current internet where costs are shared and the system is opened up to indviduals.

This is a small project to imagine what the reader would experience if this had happened and their newly purchased LOUCORP9000 ISDN modem arrives through the door ready to be connected to their BBC Microcomputer.

In order to connect a real PC to your local PAD (which is what RustTex does) you will need to run the tcpser program and the Beebem BBC micro emulator.

How to install

Download beebem from http://www.mkw.me.uk/beebem/ and install it on your PC. Versions are also available for Unix and I think mac.

You will then need to install tcpser to allow you to emulate a modem. You can download it from http://www.mkw.me.uk/beebem/tcpser.zip . Unpack the tcpser zip file and launch the GO.bat file.

Then run BeebEm. From the comms menu select RS232 destination and select localhost:25232 I’ve not had much luck connecting directly to RustTex yet so for now your have to use tcpser to connect to RustTex.

Then follow the instructions in the pamphlet below. Your phone no. is the IP address or hostname of the machine running RustTex (localhost if it’s the same PC as your running BeebEm).

Your LOUCORP9000 ISDN modem.

Congratulations on purchasing your LOUCORP9000 ISDN modem. Your ISDN modem provides the very latest technology which will allow you to connect to your local PAD (packet assembler/disassembler) and experience the internet at speeds of up to 9600 baud.

How to connect your ISDN modem to the Internet

Connect your modem to you ISDN line and connect it’s serial port to the back of the BBC micro. Once the modem is connected then you will need a terminal emulator running on your BBC micro. Below is a simple BBC basic terminal emulator your can type into your BBC micro.

10*FX2 2
20*FX7 4
30*FX8 4
40*FX229 1
50REPEAT
60  A%=138:X%=2
70  IF ADVAL(-1)>0 AND ADVAL(-3)>0 THEN Y%=GET:CALL&FFF4
80  *FX2 1
90  IF ADVAL(-2)>0 THEN VDUGET
100  *FX2 2
110UNTIL0   

Enter the code above and don’t forget to save it to a disc or tape using the SAVE “filename” command! You can now run the terminal emulator using the RUN command.

How to connect to your local PAD

In the terminal emulator type AT and press the return key. The ISDN modem should return with OK. To connect to your local pad type the following, where phone number is the phone number of your local PAD.

ATDT <phone number>

For example you could type ATDT localhost

This will connect to the PAD and you will get a screen similar to the one below.

From here you can get help by typing help! Refer to the documentation of the PAD you are dialing into for more information.

GRE tunneling for fun and profit.

I recently subscribed to Netflix and being in the UK I found that they have loads more available in the US to watch.  To get around this in a way that would also allow me to stream programmes to my chromecast is actually quite complicated.  As I have small Linux box on my network to provide IPv6 via a tunnel I thought I would allow this to also allow access via a GRE tunnel to a VPS running in the US.

The first thing you need to do is setup the machine in the US so it can do NAT just like your home router can do with the following:
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -F FORWARD

iptables -A FORWARD -m state –state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 192.168.0.0/16 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 192.168.0.0/16 -o eth0 -j MASQUERADE
iptables -A INPUT -i tun+ -j ACCEPT
iptables -A FORWARD -i tun+ -j ACCEPT
iptables -A INPUT -i tap+ -j ACCEPT
iptables -A FORWARD -i tap+ -j ACCEPT

iptables -A INPUT -i us-gre -j ACCEPT
iptables -A FORWARD -i us-gre -j ACCEPT
iptables -A INPUT -i us-gre -j ACCEPT
iptables -A FORWARD -i us-gre -j ACCEPT

Your then need to setup a GRE tunnel between your VM running in another country and your home network.  One thing to be aware of is that GRE tunnels use a specific IP protocol number rather than TCP or UDP.  This means that your need to either activate an option which enables this or setup the machine doing the routing on your home network as the DMZ host.

I used the following to setup a GRE tunnel on the VPS which will forward all data to my home network over the tunnel (my home network has addresses in the 192.168.x.x range).


ip tunnel del us-gre
ip tunnel add us-gre mode gre remote local ttl 255

ip link set us-gre up
ip addr add 192.168.X.1/24 dev us-gre

echo add routes

ip route add 192.168.0.0/16 via 192.168.X.10 dev us-gre
#ip route add 192.168.0.0/16 dev us-gre

Once you have everything setup on the VPS VM then your need to do the same on your home network with the following:


# VPN hosts.
ip rule add from 192.168.0.x table vpn

# Add default routes for vpn table.
ip route add default via 10.9.0.1 dev tun0 table vpn

ip route flush cache

ip tunnel del us-gre
ip tunnel add us-gre mode gre remote local ttl 255

ip link set us-gre up
ip addr add 192.168.8.10/24 dev us-gre

echo add default route

ip route add 0.0.0.0/1 via 192.168.8.1 dev us-gre table vpn

You will also need to run the following to add a table so you can have different routing destinations for different hosts which route via this machine.

echo 200 vpn >> /etc/iproute2/rt_tables

In order to make a machine use the tunnel your need to adjust your DHCP settings so the machine you want uses the machine with the tunnel as it’s default route. Once this is done your use:

ip rule add from ip route flush cache

table vpn on the machine with the tunnel on it. This creates a rule which makes the requested machine use a different routing table to all other traffic.