Forward port from other device

Hello, I have 2 devices. switch (10.0.0.10) and freebsd server(10.0.0.15)
I need redirect port 80 (management) from switch to port 100 on server
My ISP give me public IP only on server, but i need connect to switch from public area
(http://10.0.0.15:100)
I can use only IPFW, no next programs
I found this, but ist redirect one port to other in one device

HTML:
ipfw add 100 fwd 127.0.0.1,8080 tcp from any to any 80 in

can somebody help me ? Thank you
 
Use ssh(1) and forward a port with that. Opening up the management web interface of the switch to internet is a really bad idea.
 
OK, ssh(1) is possible, I allow only 1 ip in ipfw.
can you helpme with this

$ ssh 10.0.0.15 -R 100:10.0.0.10:80

Or how to do it best? Thanks.
 
$ ssh -L8080:10.0.0.10:80 10.0.0.15

Keep in mind that non-root users cannot open ports below 1024. Hence the use of 8080.

Once the ssh(1) session is up connect your browser to http://localhost:8080.
 
Connect to localhost port 8080 if you want to connect to the switch.
 
Back
Top