On the Net

|Main Blog|Yearning|  

Words of God


About Linux News and OpenSource

How to Install and Use Windows Applications on Linux using PlayOnLinux
Thursday, January 31, 2019

In this article, we will explain how to install PlayOnLinux on your Ubuntu both through the command line and the graphical user interface. More importantly, we will explain how to install a Windows application, Notepad Plus Plus in our example, by using PlayOnLinux. .. read more..

How To Add The BlackArch Pentesting Repository To Arch Linux
Thursday, January 31, 2019

BlackArch is a penetration testing distribution, similar to Kali Linux, but it’s built on top of Arch Linux. In reality, BlackArch is really a pre-configured Arch installation with an extra repository full of security tools. As a result, you can add the BlackArch repository to a regular install o... .. read more..

WINE 4.0, LXQt 0.14, Parrot OS, Mastodon, MythTV, Gitea, APT Vulnerability | ...
Thursday, January 31, 2019

also on TWinL52: Lubuntu Council Announced, Manjaro Stable Update Breakage, Multipass, gotop, TuxClocker, Dell's XPS 13 9380, Ad Blocker Breakage in Chrome Extension Manifest V3, Humble Bundles .. read more..

Free Drawing And Painting Program MyPaint 2.0.0 Alpha Released
Thursday, January 31, 2019

After being in development for more than 2 years, MyPaint 2.0.0 alpha is available for download. MyPaint is a free, open source drawing and painting program available for Windows, macOS, and Linux. The application features infinite canvas, configurable brushes, graphics tablet support, and a dist... .. read more..

Ubuntu 18.04 needs patching
Thursday, January 31, 2019

Canonical is updating Ubuntu 18.04 to the 4.15.0-44.47 Linux kernel to fix several security bugs. .. read more..




and below are my posts....


Friday, October 19, 2007

Making your ssh server to act as a gateway by port forwarding

Ok, this is quick. My objective is to access the web, webmin and ssh of serverX. See below the text diagram.


[My Linux desktop]<-->[Routers]<-->[ssh server]<-->[routers]<-->[serverX]


Here's how.

-Create a file named config inside your $HOME/.ssh/

#.ssh/config
User root
LocalForward 20000 10.9.2.6:80
LocalForward 22000 10.9.2.6:22
LocalForward 20001 10.9.2.6:10000

I'm accessing as root, and the IP Add is the IP of serverX, you may put the hostname if you have it on you host file or dns. Ok, when finished on the file, if I connect to the ssh server..

[root@my desktop ~]# ssh -l root ssh-server
root@ssh-server's password:
[root@ssh-server ~]#

After able to established an ssh connection, on my local terminal, those ports listed on the file will open.

tcp 0 0 127.0.0.1:20000 0.0.0.0:* LISTEN 26163/ssh
tcp 0 0 127.0.0.1:20001 0.0.0.0:* LISTEN 26163/ssh
tcp 0 0 127.0.0.1:22000 0.0.0.0:* LISTEN 26163/ssh
tcp 0 0 127.0.0.1:46279 127.0.0.1:22000 ESTABLISHED 26166/ssh
tcp 0 0 127.0.0.1:22000 127.0.0.1:46279 ESTABLISHED 26163/ssh
tcp 0 0 127.0.0.1:40487 127.0.0.1:20000 TIME_WAIT -
tcp 0 0 ::1:20000 :::* LISTEN 26163/ssh
tcp 0 0 ::1:20001 :::* LISTEN 26163/ssh
tcp 0 0 ::1:22000 :::* LISTEN 26163/ssh

Then you can just access those locally and you are going to be connected to the serverX via ssh. If you wish to access serverX web server, just open a the your browser with url

http://127.0.0.1:20000

or if you wish to open the webmin, then type

http://127.0.0.1:20001


Note: Don not dis engaged your ssh connection to the ssh server, else you wont be able to connect on those 2xxxx ports.

Well, its not an original trick, just found those by searching, I just need to compile for future reference.


Thanks.

2 Comments:

  • Hello.. Do you know how to Add Adsense Code Inside Single Post Only in XML Template? Visit your blog to learn how.. Have a nice thursday!

    By Anonymous Anonymous, at 4:19 PM  

  • hello... hapi blogging... have a nice day! just visiting here....

    By Anonymous Anonymous, at 8:30 AM  

Post a Comment

<< Home