ipfw forwarding

Hi all!

I have a machine with one vimage, with a world accessible IP address. The vimage has sshd running on port 22 listening on their IP address. The host machine has sshd running on 2222 listening on an internal address of 10.1.1.1 (I used netgraph). I want to be able to ssh into the host with the vimage's IP address. So far in the vimage's ipfw configuration I have:

Code:
fwd 10.1.1.1,2222 tcp from any to VIMAGESPUBLICIPHERE dst-port 22 setup keep-state

However when I try to ssh into the host machine with the vimage's ip address, the connection is refused.

Any pointers?

Thanks
 
What IP address does the VIMAGE have? If it's in the same 10.1.1.0/24 subnet there's no need for NAT or redirection.
 
Hi:

I used to attach 2 connected pseudo-Ethernet interfaces to the host and the vimage, they are both on the same 10.1.1.0/24 subnet, the host have 10.1.1.1, and the vimage have 10.1.1.2, ssh on the host is listening on 10.1.1.1:2222

Thanks
 
Then just connect to the IP address of the VIMAGE. Think of the jail as a completely separate machine.
 
Back
Top