• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 493
  • Last Modified:

How to change my IP address when using SSH?

I have a server with a firewall configured to only accept certain IP addresses for SSHing.  I'm not at my apartment using my IP address that I can access it with.  But I do know my IP address at my apartment.

Is it possible to use SSH and give it the IP address I want to use?

Thanks for any help!
4 Solutions
<<I have a server with a firewall configured to only accept certain IP addresses for SSHing>>
The blocking of the IPs is done by the firewall.
Hence you must modify the firewall rules to allow access of the IP from your apartment.

Once you are able to get pass the firewall you should be able to SSH.

You generally can't just use an IP address of another device - that would create all sorts of issues. However, have you considered SSHing to a computer that can SSH to the server?

As in Computer At Your AparmentSSHComputer that can access serverSSHServer?

Otherwise, asidu is right, just change the firewall to allow access from your apartment IP.
parlaysAuthor Commented:
I might not have been clear, im not at my apartment, which has an IP that can access the server.  At my current location, can I spoof or use that IP by manually typing it somewhere?
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

No you can't

If you pretend to have another IP-address, then the ssh servers ansers would be setn back to this IP-address and not to the host you're connecting from.

Spoofing an IP address is pretty tricky to do, from what I understand.  In the event that you could, would you really care about only allowing those certain IP's anymore?

If you're worried about script kiddies breaking into the server, here are measures that minimize the server's attack surface while giving the most flexibility:
 1.) configure the firewall to forward a non-standard port to your server's SSH port (22).
 2.) use something like denyhosts [ http://denyhosts.sourceforge.net/ ] to block abusers
 3.) disallow root access

Allowing root access on the standard SSH port is the surest way of having the server compromised.  The above tactics are the most secure method I've found without having to go so far as to using IP-based access (which can really go wrong if you only allow your home IP to access, then it changes).
Basically, NO.

The IP address that belongs to your apartment even if it is from the same ISP that you are connected right now cannot be used elsewere. I you can Spoof the IP address (make believe that you have that IP address) it may get there, but on the way back (the ACK of the TCP session) it will go back to the original device that has that IP.

hope that help..

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now