How to get periodically public IP address to Email?


essie

Member
Local time
4:59 PM
Posts
16
OS
Windows 11 Pro
I need occasionally RDP to access my other computer from home but public IP changes quite often.
And RDP fails.

Is there any ready trick to get twice per day public IP to Email?

Any other suggested solution?
 
Windows Build/Version
24H2

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    GIGABYTE
    CPU
    i5-13400
    Motherboard
    GIGABYTE Intel B760 DS3H DDR4 LGA1700
    Memory
    32GB
    Graphics Card(s)
    GT1030 2GB GDDR5 GV-N1030SL-2GL GIGABYTE
    Hard Drives
    Samsung 980 PRO 2 TB (MZ-V8P2T0BW), and WD Red Plus 4TB WD40EFPX
Opening RDP over the internet is a really bad idea, but you'd either want to setup a Dynamic DNS service or if you have a system always running at home you write a simple script to query any number of websites, get your public IP and send the email.


A better solution would be to setup a VPN service on your home network, connect to that and then RDP to the local device IP
 

My Computer

System One

  • OS
    Linux Mint
    Computer type
    Laptop
    Manufacturer/Model
    System76 Lemur Pro
Is it only E-Mail that is the question? I have Browser access to the E-Mail account provided by my ISP and can access from any computer with Internet service. If desired I could set up an installed E-Mail Client such as Thunderbird or SeaMonkey to manage from one computer. The ISPs in my area can provide a static IP address but there's an additional monthly cost.
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM Version 24H2 Build 26100.4202
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Win11 Pro RTM Version 24H2 Build 26100.4202
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
I need occasionally RDP to access my other computer from home but public IP changes quite often.
And RDP fails.

Is there any ready trick to get twice per day public IP to Email?

Any other suggested solution?

It is free and open source:

 

My Computer

System One

  • OS
    macOS
    Computer type
    PC/Desktop
    Manufacturer/Model
    Mac mini M4
    CPU
    Apple silicon M4
    Memory
    32 GB
    Graphics Card(s)
    Apple silicon M4
    Monitor(s) Displays
    LG 27GN650-B IPS HDR Gaming Monitor 27" FHD
    Screen Resolution
    1080p
    Hard Drives
    Apple SSD AP1024Z
    Internet Speed
    1 Gbps / 1 Gbps symmetrical FTTH (GPON)
    Browser
    Microsoft Edge
TeamViewer (free) can be set up to automatically accept inbound connections in a secure way, as long as you can access it initially.
I have it set up on some friends' and family's computers to help them with technical problems.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8524
    CPU Pentium Silver N6000
    RAM 4GB
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
TeamViewer (free) can be set up to automatically accept inbound connections in a secure way, as long as you can access it initially.
I have it set up on some friends' and family's computers to help them with technical problems.
I have used Teamviewer earlier but the lisence is too expensive €70 per month. Teamvierer free version doesn't work as company is paranoid about customers using it for work. I got continuosly blocked or sessions were limited to 30 seconds, when I attempted to help some friend or relative to fix Windows or Gmail problems. I have used TeamViewer perhaps 1-2 month. I have tired of asking and waiting Teamviewer support to reopen my account. Possibly they monitor traffic for Outlook usage, as 90% I open Emails in remote PC due to double verification of many popular sites.
probably they consider that someone wants to read Emails at work. It's just my guess. There is also Anydesk, but after Teamviewer I don't trust it too much.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    GIGABYTE
    CPU
    i5-13400
    Motherboard
    GIGABYTE Intel B760 DS3H DDR4 LGA1700
    Memory
    32GB
    Graphics Card(s)
    GT1030 2GB GDDR5 GV-N1030SL-2GL GIGABYTE
    Hard Drives
    Samsung 980 PRO 2 TB (MZ-V8P2T0BW), and WD Red Plus 4TB WD40EFPX
@essie
Are you trying to access your work computer from home and you want it to automatically send you its public IP address? I think you really ought to discuss this with your employer!

If you work from home they should offer a solution.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8524
    CPU Pentium Silver N6000
    RAM 4GB
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
Hi Kepler, I'm the employer you suggest to contact. Please check my initial message.
I had an idea to use senders IP address in automatically sent Email header to get public IP daily.
But I'm sure there are better and well tested solutions.
Just to get public IP using DDNS means dependency of 3rd party.
 

My Computer

System One

  • OS
    Windows 11 Pro
    Computer type
    PC/Desktop
    Manufacturer/Model
    GIGABYTE
    CPU
    i5-13400
    Motherboard
    GIGABYTE Intel B760 DS3H DDR4 LGA1700
    Memory
    32GB
    Graphics Card(s)
    GT1030 2GB GDDR5 GV-N1030SL-2GL GIGABYTE
    Hard Drives
    Samsung 980 PRO 2 TB (MZ-V8P2T0BW), and WD Red Plus 4TB WD40EFPX
@essie

You never made clear that you were self-employed. Anyway, what email do you use? And are you running an email server at work, because if so, the IP address in the email header might not be what you are looking for.

To find the sender's IP address in an email header, follow these steps:

✅ Step-by-Step Instructions:
Open the full email header
This varies by email client:

Gmail: Click the three dots (⋮) > Show original

Outlook: File > Properties > Internet headers

Thunderbird: More > View Source

Search for the first "Received:" line (from the bottom up)
Email headers list the path the message took from the sender to you. The bottom-most Received: line is usually the one added by the first mail server — closest to the sender.

Look for an IP address in square brackets
Example:


Received: from somehost.example.com (somehost.example.com. [203.0.113.42])
In this case, 203.0.113.42 is likely the sender's IP.

Remember, an IP6 address could look like this 2001:0db8:85a3:0000:0000:8a2e:0370:7334
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8524
    CPU Pentium Silver N6000
    RAM 4GB
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
Powershell:
(Invoke-WebRequest -Uri 'https://api.ipify.org?format=json' | ConvertFrom-Json).ip

Should get you your public IP address in a PowerShell script. Then you just need to work out how to get the information to yourself.
 

My Computer

System One

  • OS
    Windows 11 Pro 25H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Core i7-1260P
    Motherboard
    NUC12WSBi7
    Memory
    64 GB Micron PC4-25600
    Graphics Card(s)
    Intel Iris Xe Graphics
    Sound Card
    on-board Realtek HD Audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840 x 2160
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Crucial MX500 2 TB
    Antivirus
    Microsoft Defender
Powershell:
(Invoke-WebRequest -Uri 'https://api.ipify.org?format=json' | ConvertFrom-Json).ip

Should get you your public IP address in a PowerShell script. Then you just need to work out how to get the information to yourself.
Will that still work if she uses Outlook?
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    Acemagic LX15PRO
    CPU
    AMD Ryzen 7 5825U with Radeon Graphics
    Memory
    16GB
    Screen Resolution
    1920 x 1080
    Hard Drives
    SSD 2TB
    Internet Speed
    30 Mbps
    Browser
    Brave
    Antivirus
    Webroot Secure Anywhere
    Other Info
    System 3

    Acer Swift SF114-34 laptop
    OS Windows 11 Pro 26200.8524
    CPU Pentium Silver N6000
    RAM 4GB
    SSD Samsung 970 EVO Plus SSD 2TB (an upgrade)
  • Operating System
    Windows 11 Pro 23H2 22631.2506
    Computer type
    Laptop
    Manufacturer/Model
    HP Mini 210-1090NR PC (bought in late 2009!)
    CPU
    Atom N450 1.66GHz
    Memory
    2GB
    Browser
    Brave
    Antivirus
    Webroot
Powershell:
(Invoke-WebRequest -Uri 'https://api.ipify.org?format=json' | ConvertFrom-Json).ip

Should get you your public IP address in a PowerShell script. Then you just need to work out how to get the information to yourself.

Use a cloud storage service like OneDrive, Google Drive or Dropbox to share the file. The disadvantage of e-mail is you'll be receiving a set of messages that may need to be deleted after a while. Most cloud services only take a few seconds to sync a tiny text file.

You could create a scheduled task to run this command once an hour.

Code:
powershell -C "(Invoke-WebRequest -Uri 'https://api.ipify.org?format=json' | ConvertFrom-Json).ip | Out-File C:\Users\pseymour\OneDrive\Documents\MyPublicIP.txt -Force"
 

My Computer

System One

  • OS
    Windows 7
Pay your ISP to allocate a Static IP address to your home internet.
Or, what router do you use at home? Some routers allow you to setup DDNS. There are free DDNS services you can use.
Its been a while but I used to use it way back when WOL was much easier to manage.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard thingy
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • Operating System
    Windows 11 Pro 25H2 Build 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
Pay your ISP to allocate a Static IP address to your home internet.
Or, what router do you use at home? Some routers allow you to setup DDNS. There are free DDNS services you can use.
Its been a while but I used to use it way back when WOL was much easier to manage.
In the U.S., static IP's normally require a business-tier contract from your ISP and the pricing is absurd.
 

My Computer

System One

  • OS
    Windows 7
My ISP in Australia, you get a free Static IP with a business plan, home accounts can get one for AU$5 a month (current exchange = US$3.20 per month)
Best ISP and connection I’ve ever had.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 25H2 Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Sin-built 2013
    CPU
    Intel(R) Core(TM) i7-4770K CPU @ 3.50GHz
    Motherboard
    ASUS ROG Maximus VI Formula
    Memory
    32.0 GB of I forget and the box is in storage.
    Graphics Card(s)
    Gigabyte nVidia GeForce GTX 1660 Super OC 6GB
    Sound Card
    Onboard thingy
    Monitor(s) Displays
    5 x LG 25MS500-B - 1 x 24MK430H-B - 1 x Wacom Pro 22" Touch Screen Tablet
    Screen Resolution
    All over the place
    Hard Drives
    Too many to list.
    OS on Samsung 1TB 870 QVO SATA
    PSU
    Silverstone 1500
    Case
    NZXT Phantom 820 Full-Tower Case
    Cooling
    Noctua NH-D15 Elite Class Dual Tower CPU Cooler / 6 x EziDIY 120mm / 2 x Corsair 140mm somethings / 1 x 140mm Thermaltake something / 2 x 200mm Corsair.
    Keyboard
    Corsair K95 / Logitech diNovo Edge Wireless
    Mouse
    Logitech: G402 / G502 / Mx Masters / Mx Air Cordless
    Internet Speed
    2000/500Mbps
    Browser
    All sorts
    Antivirus
    Kaspersky Premium
    Other Info
    ㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤㅤ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
    TP-Link BE9300 WiFi 7 Bluetooth 5.4 (Archer TBE550E)
    TP-Link TX201 V1 2.5GB Lan

    Grandstream HT812 - VoIP
    ASUS DSL-AX82U - Mesh
    ASUS RT-AC68U - Mesh
    ASUS RT-BE88U Router

    Brother MFC-L2880DW Printer

    I’m on a horse.
  • Operating System
    Windows 11 Pro 25H2 Build 26200.8524
    Computer type
    Laptop
    Manufacturer/Model
    LENOVO Yoga 7 14IRL8 - 7i EVO OLED 14" Touchscreen i5 12 Core 16GB/512GB
    CPU
    Intel Core 12th Gen i5-1240P Processor (1.7 - 4.4GHz)
    Memory
    16GB LPDDR5 RAM
    Graphics card(s)
    Intel Iris Xe Graphics Processor
    Sound Card
    Optimized with Dolby Atmos®
    Screen Resolution
    QHD 2880 x 1800 OLED
    Hard Drives
    M.2 512GB
    Antivirus
    Defender / Malwarebytes
    Other Info
    …still on a horse.
In the U.S., static IP's normally require a business-tier contract from your ISP and the pricing is absurd.
Yep, for Verizon it would cost me more than my Internet/TV/Phone contract just to add a static IP address! :eek1:
 

My Computers

System One System Two

  • OS
    Win 11 Pro 25H2, Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14500
    Motherboard
    Gigabyte B760M G P WIFI
    Memory
    64GB DDR4
    Graphics Card(s)
    GeForce RTX 4060
    Sound Card
    Chipset Realtek
    Monitor(s) Displays
    LG 45" Ultragear, Acer 24" 1080p
    Screen Resolution
    5120x1440, 1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 3D NAND NVMe M.2 SSD (O/S)
    Silicon Power 2TB US75 NVMe PCIe Gen4 M.2 2280 SSD (backup)
    Crucial BX500 2TB 3D NAND (2nd backup)
    Seagate 4TB Ironwolf, rotating HDD archive files
    External off-line backup Drives: 2 NVMe 4TB drives in external enclosures
    PSU
    Thermaltake Toughpower GF3 750W
    Case
    LIAN LI LANCOOL 216 E-ATX PC Case
    Cooling
    Lots of fans!
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
  • Operating System
    Win 11 Pro 25H2, Build 26200.8524
    Computer type
    PC/Desktop
    Manufacturer/Model
    Home Brew
    CPU
    Intel Core i5 14400
    Motherboard
    Gigabyte B760M DS3H AX
    Memory
    32GB DDR5
    Graphics card(s)
    Intel 700 Embedded GPU
    Sound Card
    Realtek Embedded
    Monitor(s) Displays
    27" HP 1080p
    Screen Resolution
    1920x1080
    Hard Drives
    Crucial P310 2TB 2280 PCIe Gen4 eD NAND PCIe SSD
    Samsung EVO 990 2TB NVMe Gen4 SSD
    Samsung 2TB SATA SSD
    PSU
    Thermaltake Smart BM3 650W
    Case
    Okinos Micro ATX Case
    Cooling
    Fans
    Keyboard
    Microsoft Comfort Curve 2000
    Mouse
    Logitech G305
    Internet Speed
    Verizon FiOS 1GB
    Browser
    Firefox
    Antivirus
    Malware Bytes & Windows Defender Security
Back
Top Bottom