LinuxQuestions.org
Review your favorite Linux distribution.
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-23-2015, 11:57 AM   #1
tux1223
LQ Newbie
 
Registered: May 2015
Posts: 1

Rep: Reputation: Disabled
Suppose you were to....


SSH into a server (In this case a Pi running Raspbian) after a new wireless modem was installed on a home network far far away. The new modem (A PK5001Z) runs on a default gateway of 192.168.0.1 whereas the old one ran on 192.168.1.1 . The modem's gateway was temporarily changed to enable you to get into the server and make the necessary changes to the interfaces file. Upon restarting the server you realized that in your haste you had neglected to change the static IP that had been previously been assigned to the server.

In other words after a moment of sheer brilliance my interfaces file now has a default gateway of 192.168.0.1 and a static IP of 192.168.1.x

I have no physical access to the server to pull the SD card, and my only way of communicating with the network is through the web interface of the modem (No other accessible machines on the network)

Yes, I could have just changed the gateway on the new modem and left well enough alone. I didn't, however, and am wondering if there is any possible configuration change I can make to the modem (via DHCP addressing etc...) that might give me access to the server and make things right.
 
Old 05-23-2015, 04:41 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,340

Rep: Reputation: Disabled
A gateway outside a connected (sub)network is an invalid TCP/IP configuration, as I'm sure you know. You have three options:
  1. Have the router NAT inbound connections behind 192.168.1.1. That way, the PI will see the incoming connection as originating from a local IP, and won't have to use a gateway at all.
  2. Send ICMP redirects to the PI, telling it that the (public/external) IP address you're connecting from can be reached via 192.168.1.1. Unless the TCP/IP stack on the PI is configured to ignore redirects, that should cause an IP route to be added to the routing table.
  3. Flood the PI with gratuitous ARPs for 192.168.0.1, in the hope that it will fool the IP stack into recognizing 192.168.0.1 as a local IP.
Options 2 or 3 may not be feasible, unless you have low-level access to the OS on the modem/router. Option 1, however, may very well be possible to implement.

Last edited by Ser Olmy; 05-23-2015 at 04:44 PM.
 
  


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
Hey everyone, I suppose I should say hi Schultz1 LinuxQuestions.org Member Intro 2 02-01-2013 02:03 PM
How big do you suppose LQ is? szboardstretcher LQ Suggestions & Feedback 3 04-03-2011 11:20 AM
[SOLVED] Hacked, I suppose - but who? How? business_kid Linux - Security 20 01-25-2011 12:47 PM
A bug.(i suppose).. harsha101087 Linux - Laptop and Netbook 1 12-16-2007 06:00 PM
what all these are suppose to mean ... alred Puppy 2 10-20-2006 07:34 AM

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

All times are GMT -5. The time now is 03:56 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