Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-17-2004, 07:53 AM
|
#1
|
LQ Newbie
Registered: Jul 2004
Posts: 6
Rep:
|
Very easy method to add additional port for SSH?
Hi Guys!
Please suggest:
What is the simplest way to have SSH server listening on two ports 22 and say 8022?
In my opinion it can be implemented using port redirection
from port 8022 on external IP to port 22 on the same IP. Is it correct?
Note: We should be able to coninue using port 22.
But I do not know exact commands and utilities.
On windows it could be done using AnalogX or a proxy like wingate.
Thanks for your help
|
|
|
07-17-2004, 08:07 AM
|
#2
|
LQ Newbie
Registered: Jul 2004
Posts: 6
Original Poster
Rep:
|
I think it can be done using ipchains and ipportfw
but don't know exactly how
or may be there is an easier method ...
|
|
|
07-17-2004, 09:25 AM
|
#3
|
Senior Member
Registered: Mar 2003
Location: Beautiful BC
Distribution: RedHat & clones, Slackware, SuSE, OpenBSD
Posts: 1,791
Rep:
|
edit your /etc/ssh/sshd_config
Port 8022
and/or
ListenAddress 172.31.200.10:22
|
|
|
07-17-2004, 12:23 PM
|
#4
|
LQ Newbie
Registered: Jul 2004
Posts: 6
Original Poster
Rep:
|
Should I use two lines like following:
Port 22
Port 8022
(or ListenAddress 172.31.200.10:22
ListenAddress 172.31.200.10:8022)
?
Thanks
|
|
|
07-17-2004, 12:40 PM
|
#5
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
The 2 Port lines should be fine. There is no point in using Listen unless you only want to use specific NICs.
|
|
|
07-17-2004, 02:26 PM
|
#6
|
Member
Registered: Sep 2002
Location: lahore pakistan
Distribution: slackware,redhat, FreeBSD,openbsd
Posts: 219
Rep:
|
otherwise
iptables -t nat -A PREROUTING -p tcp -d yourip --dport 8022 -j REDIRECT --to-port 22
|
|
|
07-17-2004, 08:50 PM
|
#7
|
LQ Newbie
Registered: Jul 2004
Posts: 6
Original Poster
Rep:
|
Thank you very much.
Last edited by aulix; 07-18-2004 at 11:10 PM.
|
|
|
All times are GMT -5. The time now is 09:34 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|