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 05-02-2012, 10:59 AM   #1
edi_corey
LQ Newbie
 
Registered: Feb 2012
Posts: 5

Rep: Reputation: Disabled
IPtables to map Virtual Host IP Port 22 on same physical host to alternate port


Hello,

I know very little about how to do this. I'm hoping someone has done this before. With a virtual host IP service running on the physical host, It currently defaults to Port 22.

I'm trying to port map this virtual host name to an alternate SFTP server port on the same host, port 8022.

I'm VERY new to this...
Is this possible using IPTables?
Has anyone done this before?
Any links I could go to to research this further?


Thanks,

Corey

Last edited by edi_corey; 05-02-2012 at 11:36 AM.
 
Old 05-04-2012, 11:08 AM   #2
mpapet
Member
 
Registered: Nov 2003
Location: Los Angeles
Distribution: debian
Posts: 548

Rep: Reputation: 72
If you control the entire virtual host, then change the port directive in sshd_config and restart. The path to that file may vary.

If you don't control the entire virtual host, then ask your provider to add the listening port you prefer and then do something with the port 22 requests. Might be fun to spend some time with fail2ban and send requests for port 22 into a tar pit.
 
  


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
iptables forward port to another host sparkey Linux - Networking 7 04-17-2013 08:49 PM
access virtual box serial port from host wykthorr Linux - Virtualization and Cloud 2 04-05-2010 11:42 PM
Do I need to forward port for IP-Based Virtual Host to work ? bobby953 Linux - Newbie 5 03-22-2010 04:30 PM
How to configure the serial port of my virtual machine with host machine. akram Linux - Newbie 4 07-31-2009 10:39 PM
redirecting a port on the same host with iptables nacio Linux - Networking 4 05-23-2008 01:15 PM

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

All times are GMT -5. The time now is 09:19 AM.

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