P
P
pashaxp2014-11-20 19:31:54
linux
pashaxp, 2014-11-20 19:31:54

How to forward a port if the server has only a gray address?

There is a server (S) (only gray address 192.168.0.10), to which port 22 ssh is forwarded from the office router (R) (here we have both a white address, for example, 1.2.3.4, and a gray address 192.168.0.1)
How to make a redirect port on S in such a way that from certain white addresses (5.6.7.0/24) you can connect to port 22 on 192.168.0.10 and get to port 80, say, server 192.168. to server port 22 192.168.0.10), the same ssh as it should?
Once again, in more detail:
1. If I connect from network 5.6.7.0/24 to 1.2.3.4:22, I get to 192.168.0.100:80 (via redirect 22 ports to 192.168.0.10)
2. If I connect from networks, other than 5.6.7.0/24 on 1.2.3.4:22, I get to 192.168.0.10:22
Update:
Of the available tools, there is only ssh to 192.168.0.10, root access. And only one port 22 on it. Nothing more. The office router no longer forwards any ports on S. There is no access to the office router.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey Cheremisin, 2014-11-20
@pashaxp

Get another external address, on another server, and forward vpn there, for example, through openvpn. There is no other way ... Although, you can also use ssh port forwarding habrahabr.ru/post/81607 and here https://help.ubuntu.com/community/SSH/OpenSSH/Port...
Or give the router admin a blow in the head.

K
krll-k, 2014-11-20
@krll-k

vpn or tor network of
course you can come up with your own bike

S
svd71, 2014-11-20
@svd71

If this is a permanent garden, then it’s better to be proud according to the method described by Alexey Cheremisin
. If this is some kind of temporary and quick solution, then you should read
habrahabr.ru/post/81607
habrahabr.ru/post/147347
port forwarding using ssh.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question