How can I find the external IP address of my router if the router is a subnet of bigger LAN
287
Try http://www.whatismyip.com/
This is what I always use when I need this info but cant access the modem.
Related videos on Youtube
Author by
nnn
Updated on September 18, 2022Comments
-
nnn over 1 year
I have created a rule in AWS-iot to invoke a lambda with following query:
select * from 'my_topic'
This rule will invoke a below javascript lambda:
var AWS = require('aws-sdk'); var zlib = require('zlib'); var s3 = new AWS.S3(); exports.handler = (event, context, callback) => { console.log("hello:"); var bucketName = "otonomobucket"; var keyName = getKeyName("myData", Date.now()); var content = event; //var content = JSON.stringify(event); console.log("event data:" + content); var params = { Bucket: bucketName, Key: keyName, Body: content }; s3.putObject(params, function (err, data) { if (err) console.log(err) else console.log("Successfully saved object to " + bucketName + "/" + keyName); }); }; function getKeyName(folder, filename) { return folder + '/' + filename + ".txt"; }
The lambda works perfectly if i publish any string to my_topic. But the lambda is not working if i publish bytearray to my_topic. CloudWatch is also not showing any logs. How could i get the byte array into my lambda function.
-
barlop almost 11 yearsso www.ifconfig.me/ip isn't what you want?
-
LSerni almost 11 yearsTry with traceroute (or hping in traceroute mode). With a bit of luck, you will see an answer from a private IP just before the connection enters the Internet, and that IP will be the one of the outside router.
-
barlop almost 11 yearsThe router itself doesn't have the IP, A NI of the Router has an IP(and not a switches NI ports). On the LAN side of a home router, is a switch, just one IP 192.168.1.1 On the other side, if it's connected to your ISP it must be a WAN that end.. It's not designed for a LAN to be connected there. I haven't used more advanced routers though that allow LANs there, but if you're connected to your ISP, it's not designed to have a LAN there. It's meant to either connect straight to the wall(if the socket in your "home router" there is a telephone socket),(cont)
-
barlop almost 11 yearsor straight to a modem, if the socket is an ethernet/RJ45 socket labelled WAN.
-
barlop almost 11 yearsI think if it could connect a LAN on that side, then the Router's Administration IP(don't know what NI that'd be associated with), but that's show you the IPs of any port. On a regular home router, you have the switch ports which don't have IPs(the computers on them do). and the other side has an interface which gets an IP, but if it was a more professional router then that interface could be given an IP by the Router, and then, it'd show you what IP it is being given But also, even my home router tells me my internet ip address. If it was sent a private one(theoretically) it'd display that.
-
andio almost 11 years@barlop : mine is just a home router. here's the scheme : PC-->linksys wireless router-->modem(cable modem)-->provider-->WAN. Since the router doesn't have public IP, i'm thinking there should be private ip involved in between the router/modem and the provider. am i right?
-
andio almost 11 years@lserni : after 192.168.1.1, i just saw * * * , then go straight to WAN . there's no other information.
-
barlop almost 11 years@andio I don't know for sure.. is that WAN interface's IP the public ip(then the modem won't have an IP), or the WAN interface 192.168.1.1 (same IP as managing the router) and the modem doesn't have an IP. And if the WAN IP is .1, and the management is .1 how does it work electronically when you access management locally, does it go to the same network interface somehow within the router. If they both use .1 then maybe the management is a kind of virtual network interface sharing an IP with the real one that's the WAN one. I don't know. You ask a thought and question provoking question
-
-
jnovacho about 7 yearsThis won't help if the ISP is your gateway to the internet. For me whatismyip.com returns something like 79.25.147.39, but my routers IP is actually 10.192.23.58. This is because my ISP is running it's own NAT.
-
nnn about 4 yearsIt is a well explained answer to the question. Thanks, you saved my day. :)