[Nottingham] Port forwarding with iptables

Nick B. nottingham at mailman.lug.org.uk
Tue Apr 29 20:24:01 2003


On Tue, Apr 29, 2003 at 03:42:33PM +0100, Steve Goodliff wrote:
> 
> 
> 
> 
> Hello All,
> 
> Please can anyone help me out with my latest linux networking conundrum.
> 
> I have a redhat 8.0 machine with 3 NIC's. 2 of them are connected to ADSL
> routers and the 3rd to our internal network.
> 
> Both routers have web front ends which I would like to access by connecting
> to the redhat box and then move onto some sort of balancing traffic across
> the 2.

If I understand this correctly (probably not :/) you want to access the
web admin page on your ADSL routers from elsewhere on the network or
off-net.
I do this with my debian box at home. I have an SMC7004ABR broadband
router on my home net and the web admin on it is only accessible via the
lan, not the WAN for obvious reasons.
I acess the debian box behind the firewall with ssh, and I have ssh set
to tunnel the bbr web admin port out via SSH. The firewall on the BBR
only allows access via port 22, ssh.

>From outside the network I run:
ssh my.home.net -L 8088:192.168.1.1:88
This allows me to log into my debian box but more importantly it sets up
a ssh encrypted tunnel to my BBR lan port.

where my.home.net is the name of your box
192.168.1.1 port 88 is the web admin port for the BBR.
8088 is the port I want to use on localhost.

Now with ssh running I point my browser at http://localhost:8088/ and I
can access the BBR web admin. You don't have to use linux ssh either, if
you're stuck with a win32 box you can use the putty ssh client.

HTH?
Nick.
-- 
Nick B.
Nottingham/UK
icq 9247450