LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 12-10-2022, 01:59 AM   #1
FrankR
LQ Newbie
 
Registered: Dec 2022
Posts: 3

Rep: Reputation: 0
SSH Tunnels - not every webserver reachable


Good Morning

Now I have tried some experiments with the SSH tunnels already.
Interestingly, I can't reach certain web servers through the tunnel, e.g. those of the local routers (ISP cable modem).
The Apache2 server on the Linux machines I can reach without any problems.
It must probably still be a setting in the ssh_config?

Here the output after the following command: SSH -R 8888:"router-ip":80 -p "port number on remote machine" "IP address remote machine"

ring@mac1-ring:~$ debug3: receive packet: type 90
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 3 win 2097152 max 32768
debug1: client_request_forwarded_tcpip: listen localhost port 8888, originator 192.168.1.148 port 50993
debug2: fd 7 setting O_NONBLOCK
debug2: fd 7 setting TCP_NODELAY
debug1: connect_next: host 192.168.1.1 ([192.168.1.1]:80) in progress, fd=7
debug3: fd 7 is O_NONBLOCK
debug3: fd 7 is O_NONBLOCK
debug1: channel 1: new [192.168.1.148]
debug1: confirm forwarded-tcpip
debug3: channel 1: waiting for connection
debug1: channel 1: connected to 192.168.1.1 port 80
debug3: send packet: type 91
debug3: receive packet: type 90
debug1: client_input_channel_open: ctype forwarded-tcpip rchan 4 win 2097152 max 32768
debug1: client_request_forwarded_tcpip: listen localhost port 8888, originator 192.168.1.148 port 50992
debug2: fd 8 setting O_NONBLOCK
debug2: fd 8 setting TCP_NODELAY
debug1: connect_next: host 192.168.1.1 ([192.168.1.1]:80) in progress, fd=8
debug3: fd 8 is O_NONBLOCK
debug3: fd 8 is O_NONBLOCK
debug1: channel 2: new [192.168.1.148]
debug1: confirm forwarded-tcpip
debug3: channel 2: waiting for connection
debug1: channel 2: connected to 192.168.1.1 port 80
debug3: send packet: type 91
debug2: channel 1: read<=0 rfd 7 len 0
debug2: channel 1: read failed
debug2: channel 1: chan_shutdown_read (i0 o0 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: input open -> drain
debug2: channel 1: ibuf empty
debug2: channel 1: send eof
debug3: send packet: type 96
debug2: channel 1: input drain -> closed
debug3: receive packet: type 96
debug2: channel 1: rcvd eof
debug2: channel 1: output open -> drain
debug2: channel 1: obuf empty
debug2: channel 1: chan_shutdown_write (i3 o1 sock 7 wfd 7 efd -1 [closed])
debug2: channel 1: output drain -> closed
debug3: receive packet: type 97
debug2: channel 1: rcvd close
debug3: channel 1: will not send data after close
debug2: channel 1: send close
debug3: send packet: type 97
debug2: channel 1: is dead
debug2: channel 1: garbage collecting
debug1: channel 1: free: 192.168.1.148, nchannels 3
debug3: channel 1: status: The following connections are open:
#0 client-session (t4 r2 i0/0 o0/0 e[write]/0 fd 4/5/6 sock -1 cc -1)
#1 192.168.1.148 (t4 r3 i3/0 o3/0 e[closed]/0 fd 7/7/-1 sock 7 cc -1)
#2 192.168.1.148 (t4 r4 i0/0 o0/473 e[closed]/0 fd 8/8/-1 sock 8 cc -1)

Last edited by FrankR; 12-10-2022 at 03:16 AM. Reason: adding log file
 
Old 12-10-2022, 05:32 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,474
Blog Entries: 7

Rep: Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573
What command are you using on the client machine, and what output do you get?

I still reckon you'd be best off using a VPN for this... you get more flexibility, it is more robust and even a little more secure.

With an ssh tunnel, if you reboot the client machine the process will die on the server.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
One webserver reachable, the other is not hrpt_rnws Linux - Networking 2 11-21-2007 02:39 PM
SSH-Tunnels, Firewall, VNC bojo Linux - Security 3 03-16-2006 05:08 AM
Creating a router out of SSH Tunnels. Technoslave Linux - Networking 1 10-04-2004 06:07 PM
SSH tunnels and VNC, yet again. Edaph Linux - Security 7 05-23-2004 09:55 AM
Automatic SSH Tunnels fearofcarpet Linux - Software 1 12-04-2003 11:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration