SFTP -- Outgoing IP


 
Thread Tools Search this Thread
Operating Systems Solaris SFTP -- Outgoing IP
# 1  
Old 08-03-2012
Bug SFTP -- Outgoing IP

Hi Gurus;

I had 2 interface.
eth1 : 10.x.x.x
eth2 : 30.x.x.x

My default out is 10.x.x.x

Now, I need to connect to public SFTP Server
If I use sftp user@public IP.

I can not connect.
because my out is 10.x.x.x

But I telnet it:
telnet -z 30.x.x.x <public IP - sftp server>
result was successfull.

Is there a way to change it to 30.x.x.x ?

Please help.
# 2  
Old 08-03-2012
There's something wrong with your routing table if it tries to connect to 10.x via 30.x or vice versa. There ought to be rules that catch 30.x and 10.x traffic first, before the default catch-all.

If these destinations are on the same subnet as you, there might even be something wrong with the subnet mask.

Subnets and routing are the way you control the outgoing IP, you can't force a particular one.

Last edited by Corona688; 08-03-2012 at 11:00 PM..
# 3  
Old 08-04-2012
There might be a router in the way. 10.x.x.x is a private subnet which will NOT be routed to the internet, while 30.x.x.x is a public internet address "open" to the world. Are both NICs on the same physical wire? And what wire is the router on? Anyhow, as Corona668 point out, separate your subnets and make 30.x.x.x your default route/gateway.
# 4  
Old 08-04-2012
You could always just add a static host route, it's a bit messy that you need to, but it requires the fewest changes to do it.
Form memory, it's something of the form:
Code:
route add host <public IP - sftp server> 30.x.x.x

The precise commandline might be a little different, it's been a while. Smilie
There's also a commandline arg in recent Solaris versions to make it permanent, otherwise just add it into your rc.d sequence.

But as said previously, if you need a static host route, it usually means you have something messed up in your overall routing or network structure.
# 5  
Old 08-04-2012
when using sftp, scp, etc, you can pass ssh options which are not apart of this programs options with -o: sftp -o BindAddress=30.x.x.x user@host

but as the others said, why would your LAN be your default ... misconfigured, or someones idea of security?
# 6  
Old 08-04-2012
thank for your ideas guys.
yup I think route makes sence, but it was porviden to add an outgoing to 30.x.x.x here in our company. Thanks :-D

neutronscott <-- you got it fit to my inquiry hehehe thanks man
sftp -o BindAddress=30.x.x.x user@host

Solved at last.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. IP Networking

how to delay the outgoing packets ??

hello, i am searching a way to delay the incoming packets before it goes out of the system may i know how can i approach to this problem? (3 Replies)
Discussion started by: sameer kulkarni
3 Replies

2. UNIX for Dummies Questions & Answers

How to auto CC all outgoing e-mail?

I'm using Debian 5.0.4, exim4 and mutt. I would like all outgoing mail sent by any/all users CC (not BCC) to a specified e-mail account. (I do have it working for BCC using 'unseen'.) I have spent hours of searching/reading/testing how and have not been able to find out how. I have seen it... (0 Replies)
Discussion started by: mewbie
0 Replies

3. Solaris

Can't bind to outgoing vnic

Hello all, I have set up three vnics on a machine running OSOL: LINK OVER SPEED MACADDRESS MACADDRTYPE VID vnic1 e1000g0 1000 2:8:20:f6:c8:50 random 0 vnic2 e1000g0 1000 2:8:20:56:41:6a random ... (3 Replies)
Discussion started by: PatrickBaer
3 Replies

4. UNIX and Linux Applications

Sendmail outgoing email rate

Does anyone know what's Sendmail outgoing email rate? e.g. 1000 outgoing email per minutes. If so, can we modify it? Thanks. :) (1 Reply)
Discussion started by: sunmagic2003
1 Replies

5. UNIX for Dummies Questions & Answers

Disable Outgoing Mail

I have a Solaris 2.6 server running sendmail (Version 8.9.3p2). It actually receives email and runs the sendmail process. I need to configure it so that it continues to receive email, but disable its ability to send email out. My initial ideas was to just rename the mail and mailx binaries. But... (0 Replies)
Discussion started by: Rosko
0 Replies

6. IP Networking

outgoing smtp slow

Hi all, Im having some issues with slow outgoing smtp I'm thinking maybe my internal ip is not on the whitelist? How do I go about testing or checking this? I did telnet into the port and it was not slow at all but when users send email using an email client or the webmail client it takes... (2 Replies)
Discussion started by: mcraul
2 Replies

7. AIX

copy outgoing administrator privilege

Hi, How do I make sure I copied all privileges from previous administrator account? What files/path should I modify to make mine the same. Thanks in advance, Itik (1 Reply)
Discussion started by: itik
1 Replies

8. UNIX for Dummies Questions & Answers

Need help for configuring outgoing mail in Solaris 9

G'day, I've a solaris 9 box that I want to configure so that users can send out mails to internet. How can I do it? Can someone pls list me the steps or direct me to a detailed website. Thanks in advance. (1 Reply)
Discussion started by: Albert J.
1 Replies

9. IP Networking

Redirecting outgoing packets

I'd like to find out how to redirect Outbound packets. So instead of having packets go to IP1 as they normally would, have them go to IP2 instead. I believe this is possible using IPFW but I'm not sure. I've played with it, but haven't gotten too far. Any ideas would be appreciated. (1 Reply)
Discussion started by: Seraph
1 Replies

10. UNIX for Dummies Questions & Answers

Sendmail outgoing mail only setup.

Hi. I need to set up sendmail so that it can send mail to a mail relay. I have never touched sendmail before so I am not sure how to do this. All incoming mail is directed to a different server - this is just to enable me to get mail out. Running Solaris 8 on Sparc. Many thanks, ... (6 Replies)
Discussion started by: warrend
6 Replies
Login or Register to Ask a Question