f



ssh remote forwarding with loopback ips

Hello,

Having at sshd_config:

GatewayPorts yes

With 127.0.0.1, 127.0.0.2 and 127.0.0.3 ips configured at lo interface

and configured sshd on localhost and executing next from localhost:

ssh -R 127.0.0.2:8000:localhost:80 -R 127.0.0.3:8000:jeje:80 localhost

curl -x '' http://127.0.0.2:8000 
and
curl -x '' http://127.0.0.3:8000

Give me the same reply (I have an apache listening on 80 port, but jeje is not resolved

I have read the manual, but I can't find why that is the behaviour.

I can confirm with netstat that ssh is listening on *:8000:

# netstat -punta | grep 8000
tcp        0      0 0.0.0.0:8000            0.0.0.0:*               LISTEN      4309/sshd: javi@pts 
tcp6       0      0 :::8000                 :::*                    LISTEN      4309/sshd: javi@pts 

It is possible to having -R 127.0.0.2:80:onesite:80 -R 127.0.0.3:8000:othersite:80 working with ssh ? 

What is happening here ?

$ ssh -v
OpenSSH_7.3p1 Debian-1, OpenSSL 1.0.2h  3 May 2016

Thank you very much
0
javibarroso
9/18/2016 9:59:00 AM
comp.security.ssh 4228 articles. 0 followers. terra1024 (490) is leader. Post Follow

2 Replies
423 Views

Similar Articles

[PageSpeed] 13

javibarroso@gmail.com writes:

> Hello,
>
> Having at sshd_config:
>
> GatewayPorts yes
I think it should be

--8<---------------cut here---------------start------------->8---
GatewayPorts clientspecified
--8<---------------cut here---------------end--------------->8---

and have you tried to listen on different ports (8000+8001 for example)
?
KJ

-- 
http://stopstopnop.pl/stop_stopnop.pl_o_nas.html
Love may laugh at locksmiths, but he has a profound respect for money bags.
		-- Sidney Paternoster, "The Folly of the Wise"
0
kjonca
9/19/2016 4:25:31 AM
El lunes, 19 de septiembre de 2016, 6:26:00 (UTC+2), Kamil Jo=C5=84ca  escr=
ibi=C3=B3:
> javibarroso@gmail.com writes:
>=20
> > Hello,
> >
> > Having at sshd_config:
> >
> > GatewayPorts yes
> I think it should be
>=20
> --8<---------------cut here---------------start------------->8---
> GatewayPorts clientspecified
> --8<---------------cut here---------------end--------------->8---
>=20
I did not know about clientspecified option, I have read too fast the Gatew=
ayPorts section... Thank you very much it is working with your tip

Regards
0
javibarroso
9/22/2016 8:43:10 PM
Reply: