iIn the past several weeks I have upgraded our home ADSL (which is also our small business internet access) to make it more robust. We have two telephone lines so I got ADSL enabled on the second one so now if one goes down we can still connect. (OK, I know if someone takes the wires out between us and the exchange we probably lose both but there are limits to what's worth doing).
The second ADSL is a BT business connection and a free BT Business Hub router comes with it, actually a 2Wire 2700HGV. When it came it installed without fuss and worked, I made its IP address 192.168.1.254 with our original ADSL router as 192.168.1.1. I "shared" access by setting up Maxine's computer to use 192.168.1.254 as its default route and mine to use 192.168.1.1. So far so good, it worked fine, but of course I'd have to manually change things if either ADSL connection went down.
So, my next improvement was to get a new Draytek Vigor 2820n router for the not-BT ADSL. I mainly got this for the better (or at least easier to configure) firewall but it offers sharing facilities for two WAN connections and this is where the fun starts.
WAN1 on the 2820n is the ADSL connection (EntaNet), WAN2 is an ordinary ethernet connection which can be connected to another router/modem. So I removed the 2Wire router from the 192.168.1.x subnet and plugged it into the WAN2 port of the 2820n. I have set the WAN2 'subnet' to be 192.168.13.x and the 2Wire router is 192.168.13.254.
After a few hiccoughs I have got it working but the 2Wire router is causing some issues. For some reason the 2wire router sets itself up so you can access it as http://gateway.2wire.net/ rather than just its IP address (or a name you put in /etc/hosts) on the local LAN. This initially caused some fun and games when I tried to access it but after a while it asked if I wanted to set 192.168.1.x (or maybe 192.168.13.x) as a DMZ and all was well.
However I now have another issue caused by this http://gateway.2wire.net/ thing. I want to be able to set up the routers remotely, rather than opening their browser interface to the outside world I'm creating an ssh tunnel to my home machine and port forwarding the router IP. E.g. for the 28820n I do:-
ssh -L 50080:192.168.1.1:80 home.isbd.net
and it works perfectly, Firefox at work connects to localhost:50080 and sees the 2820n web interface. Similarly I can connect to our DECT SIP phone set up web pages and configure that.
The problem is that if I do:-
ssh -L 50080:192.168.13.254:80 home.isbd.net
and try connecting to localhost:50080 it gets a page not found error because it's trying to connect to http://gateway.2wire.net/xslt?PAGE=HURL00
Can anyone suggest a way around this problem?
(Sorry for the long winded explanation)