LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 01-08-2015, 11:27 AM   #1
cloudydaze
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Rep: Reputation: Disabled
I have 1 VPS (ubuntu) with 3 IPs. How can I create separate SSH tunnels for them?


So I have my server, 5.5.5.1, and it has IPs 5.5.5.1, 5.5.5.2, and 5.5.5.3

I'd like to create SSH tunnels to .1, .2, and .3. Usually, to create a tunnel, I just do:

Code:
ssh -N -D 1337 user@5.5.5.1
I've tried using -b 5.5.5.2 which says:

Code:
bind: 5.5.5.2 Cannot assign requested address.
ssh: connect to host 5.5.5.1 port 22: Cannot assign requested address
I've looked for solutions with iptables, but honestly it is pretty confusing to me and I am not sure where to start.

I originally found this thread here, which is why I am asking here: http://www.linuxquestions.org/questi...le-ips-720679/

Thank you for the help!

=====

Just going with this for now, and running a proxy server on each user. Not the best way for me but better than nothing, I'll find a way to automate it somehow I guess.

https://www.webhostingtalk.com/showp...56&postcount=5

Last edited by cloudydaze; 01-12-2015 at 02:12 PM.
 
Old 01-08-2015, 02:23 PM   #2
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,867

Rep: Reputation: 162Reputation: 162
Do these three IPs belong to signal NIC or three NIC?
 
Old 01-08-2015, 08:15 PM   #3
cloudydaze
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
Do these three IPs belong to signal NIC or three NIC?
I'm sorry, I don't know what that means. I bought a low end box and it had the option of multiple IP addresses, so I got three, then I installed ubuntu and that's where I am now.
 
Old 01-09-2015, 02:41 PM   #4
nini09
Senior Member
 
Registered: Apr 2009
Posts: 1,867

Rep: Reputation: 162Reputation: 162
For adding another IP address on VPS, you need configure two places, VPS and Linux environment.
Did you do both?
For VPS,
Log in to the Customer Portal.
On the menu bar, click Services and then click My Services.
Locate your Cloud VPS service, and then click Manage. The Cloud VPS page appears.
Under VM Controls, click Add IP.
The new IP address appears under Secondary IPs.

To configure an additional IP address on CentOS and Fedora, follow these steps:

Log in to the Cloud VPS instance using SSH.
As the root user, type the following command:

cd /etc/sysconfig/network-scripts

In your preferred text editor, create a new file named ifcfg-eth0:0.

To add additional IP addresses, increment the second digit in the filename. For example, if you want to add additional IP addresses, you can create files named ifcfg-eth0:1, ifcfg-eth0:2, and so on.

Add the following text to the file:

DEVICE=eth0:0
BOOTPROTO=none
ONPARENT=yes
IPADDR=xxx.xxx.xxx.xxx
NETMASK=255.255.255.0

Make sure the numbers in the DEVICE value match the numbers in the ifcfg-eth filename.

Replace xxx.xxx.xxx.xxx with the IP address that you want to add to the Cloud VPS instance.

Save the changes to the ifcfg-eth0:0 file, and then exit the text editor.

To restart the network interfaces, type the following command:

service network restart

To verify that the new IP address is active, type the following command:

ifconfig
 
1 members found this post helpful.
Old 01-09-2015, 04:45 PM   #5
cloudydaze
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by nini09 View Post
words
Ah yes, the IPs are in ifconfig. They all have separate names, with :0, :1, and :2. How can I go about using them?
 
Old 01-12-2015, 12:59 AM   #6
cloudydaze
LQ Newbie
 
Registered: Jan 2015
Posts: 4

Original Poster
Rep: Reputation: Disabled
Bump.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
VPS Setting up multiple outgoing ips Smasher03 Linux - Server 2 06-11-2011 10:25 AM
LXer: How to Create a separate home partition in Ubuntu LXer Syndicated Linux News 0 04-22-2010 04:30 PM
ssh tunnels question philosophia Linux - Newbie 2 01-29-2010 03:03 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 11:03 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