Automated monitoring of Google's IP ranges with real-time alerts, interactive charts, and firewall rule exports
Live Dashboard โข Chart Analytics โข Export Rules โข Roadmap
Google IP Monitor is an automated infrastructure monitoring tool that tracks changes in Google Cloud and Google Public IP ranges. Built for DevOps engineers, network administrators, and security teams who need to stay informed about Google's infrastructure changes.
- ๐ Real-time Alerts - Get instant Telegram notifications every 3 hours when IP ranges change
- ๐ Interactive Charts - Visualize IP growth trends with Chart.js (Line, Bar, Pie charts)
- ๐ฅ Firewall Export - Download ready-to-use rules for 9+ firewall formats (iptables, AWS, Azure, Cisco, pfSense, MikroTik, etc.)
- ๐ Visual Dashboard - Beautiful Chrome-inspired dark theme interface
- ๐๏ธ Microservices Architecture - Modular, scalable, and maintainable design
- ๐ค Fully Automated - Runs every 3 hours via GitHub Actions, zero maintenance
- ๐ฐ 100% Free - No servers, no costs, forever
- ๐ Historical Tracking - All changes stored in Git for audit trails
- ๐ Secure - No API keys exposed, runs in isolated GitHub environment
| Feature | Description |
|---|---|
| Every 3 Hours Monitoring | Automatically checks Google's IP ranges 8 times per day |
| Change Detection | Identifies added and removed IP prefixes with detailed diff reports |
| Interactive Charts | Line, Bar, and Pie charts showing historical trends and analytics |
| Telegram Alerts | Instant notifications with formatted summaries of changes |
| 9 Export Formats | Download firewall rules for iptables, AWS, Azure, Cisco, pfSense, MikroTik, CSV, JSON, Plain Text |
| Chart Data Exports | Export historical metrics in CSV, JSON, and Markdown formats |
| Web Dashboard | Responsive, dark-themed interface showing current status and history |
| Microservices Backend | 5 independent services for scalability and maintainability |
| Git-based Storage | All data versioned and tracked in GitHub |
| Multi-source | Monitors both cloud.json and goog.json endpoints |
|
Cloud Providers
Network Equipment
|
Firewalls
Data Formats
|
๐ Google IP Ranges Report
๐
Date: 2025-10-10 15:00
========================================
๐ Changes detected!
โ Added (3):
โข 34.128.0.0/16
โข 35.192.0.0/14
โข 2600:1900::/35
๐ Statistics:
Previous: 1,234 ranges
Current: 1,236 ranges
Net change: +2
- Live Statistics - Current vs previous day comparison
- Historical Charts - Interactive visualizations with Chart.js
- ๐ Line Chart: IP range growth over time
- ๐ Bar Chart: Daily changes (last 30 days)
- ๐ฅง Pie Chart: IPv4 vs IPv6 distribution
- Change Tracking - Color-coded additions and removals
- One-Click Export - Download firewall rules in your preferred format
- Chart Data Exports - Export metrics to CSV, JSON, Markdown
- Responsive Design - Works on desktop, tablet, and mobile
- Fast Navigation - Quick access to exports and historical data
1. Security & Compliance
- โ Maintain up-to-date firewall rules for Google services
- โ Audit trail for regulatory compliance (SOC2, ISO 27001)
- โ Detect unauthorized IP range changes
- โ Export rules for automated deployment pipelines
2. Network Administration
- โ Update VPN and proxy configurations automatically
- โ Maintain accurate routing tables
- โ Monitor Google Cloud infrastructure expansion
- โ Generate router configs for Cisco/MikroTik
3. DevOps & SRE
- โ Sync infrastructure-as-code with latest Google IPs
- โ Prevent service disruptions due to IP changes
- โ Automate terraform/ansible configuration updates
- โ Import into AWS/Azure security groups
4. Email Security
- โ Validate Google Workspace sender IPs
- โ Update SPF records for custom domains
- โ Detect email spoofing attempts
- โ Configure mail server whitelists
5. API Integration
- โ Whitelist Google service IPs for API endpoints
- โ Secure webhooks and callbacks
- โ Validate incoming requests
- โ Configure CDN and WAF rules
6. Research & Analytics
- โ Track Google's infrastructure growth
- โ Geographic distribution analysis
- โ Network topology research
- โ Export data for custom analysis
- GitHub account
- Telegram account (optional but recommended)
- 5 minutes of your time
- Open Telegram and search for
@BotFather - Send:
/newbot - Follow the prompts and save your Bot Token
- Get your Chat ID from
@userinfobot
-
Fork this repository
https://github.com/m3hr4nn/googleipmonitor -
Add GitHub Secrets (if using Telegram)
- Go to
SettingsโSecrets and variablesโActions - Add
TELEGRAM_BOT_TOKEN - Add
TELEGRAM_CHAT_ID
- Go to
-
Enable GitHub Actions
- Go to
Actionstab - Click "I understand my workflows, go ahead and enable them"
- Go to
-
Enable GitHub Pages
- Go to
SettingsโPages - Source: Deploy from branch
mainโ/ (root) - Click Save
- Go to
Actions โ Google IP Monitor โ Run workflow๐ Done! Your dashboard will be live in 2-3 minutes at:
- Dashboard:
https://YOUR_USERNAME.github.io/googleipmonitor/ - Chart Analytics:
https://YOUR_USERNAME.github.io/googleipmonitor/exports/charts/ - Firewall Exports:
https://YOUR_USERNAME.github.io/googleipmonitor/exports/
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ GitHub Actions (Every 3 Hours) โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Fetch IPs โโโโถโ Compare Data โโโโถโ Generate Dashboard โ โ
โ โ from Googleโ โ Find Changesโ โ + Charts (via Gateway) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
โ Git โ โ Telegram โ โ GitHub โ
โ History โ โ Bot โ โ Pages โ
โ + Cache โ โ โ โ Dashboardโ
โโโโโโโโโโโโ โโโโโโโโโโโโ โโโโโโโโโโโโ
generate_report.py
โ
ChartAPIGateway (Orchestrator)
โ
โโ [1] DataAggregatorService โโโโโถ cache/metrics.json
โ
โโ [2] ChartConfigService โโโโโโโโโถ cache/chart_configs.json
โ
โโ [3] ChartRendererService โโโโโโโถ HTML/JavaScript
โ
โโ [4] ChartExportService โโโโโโโโโโถ exports/charts/*
โ
Return to generate_report.py โโโถ Inject into index.html
5 Independent Microservices:
- DataAggregatorService - Parse historical data and compute metrics
- ChartConfigService - Generate Chart.js configurations
- ChartRendererService - Render HTML/JavaScript components
- ChartExportService - Export data in multiple formats
- ChartAPIGateway - Orchestrate all services with error handling
For detailed architecture documentation, see CLAUDE.md
- Visit:
https://YOUR_USERNAME.github.io/googleipmonitor/exports/ - Click on your desired format
- Download and deploy!
# Download and apply
wget https://YOUR_USERNAME.github.io/googleipmonitor/exports/iptables.sh
chmod +x iptables.sh
sudo ./iptables.sh# Import via AWS CLI
aws ec2 create-security-group \
--group-name google-ips \
--description "Google IP Ranges" \
--cli-input-json file://aws-security-group.json# Import via Azure CLI
az network nsg create \
--resource-group myResourceGroup \
--name GoogleIPs
az network nsg rule create \
--nsg-name GoogleIPs \
--cli-input-json @azure-nsg.json! Copy/paste into Cisco IOS config
! File: cisco-acl.txt
configure terminal
[paste contents here]
end
write memory
1. Go to Firewall > Aliases
2. Click "Import"
3. Upload pfsense-alias.txt
4. Apply changes
# Upload and execute
/import file=mikrotik.rsc
Edit .github/workflows/monitor.yml:
schedule:
# Run every 3 hours (default)
- cron: '0 */3 * * *'
# Or run every hour
- cron: '0 * * * *'
# Or run twice daily at 9 AM and 9 PM UTC
- cron: '0 9,21 * * *'Edit monitor.py:
self.urls = {
'cloud': 'https://www.gstatic.com/ipranges/cloud.json',
'goog': 'https://www.gstatic.com/ipranges/goog.json',
'custom': 'https://your-source.com/ips.json' # Add your source
}Edit config/chart_settings.json:
{
"enabled": true,
"days_to_show": 90,
"charts": {
"line_chart": {"enabled": true, "height": 400},
"bar_chart": {"enabled": true, "height": 350},
"pie_chart": {"enabled": true, "height": 320}
}
}Edit styles.css to change colors:
:root {
--accent-blue: #8ab4f8; /* Primary accent */
--accent-green: #81c995; /* Success/additions */
--accent-red: #f28b82; /* Errors/removals */
}If you just want exports without Telegram notifications:
- Don't add the Telegram secrets
- The workflow will still run and generate exports
- You'll see "Telegram credentials not set" in logs (this is fine)
See the detailed ROADMAP.md for:
- โ Completed features (v1.0.0 - v1.1.0)
- ๐ง In-progress development
- ๐ Planned features with timelines
- ๐ก Feature request process
- ๐ Release schedule
Want a feature? Create an issue or vote with ๐ on existing requests!
Contributions are what make the open-source community amazing! Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guide for Python code
- Add comments for complex logic
- Test your changes locally before submitting
- Update documentation if you add new features
# Clone the repo
git clone https://github.com/m3hr4nn/googleipmonitor.git
cd googleipmonitor
# Install dependencies
pip install -r requirements.txt
# Set environment variables (optional)
export TELEGRAM_BOT_TOKEN="your-token"
export TELEGRAM_CHAT_ID="your-chat-id"
# Run locally
python monitor.py # Fetch and compare IPs
python generate_report.py # Generate dashboard with charts
python generate_firewall_rules.py # Generate exports
# Test microservices (v1.1.0+)
python services/chart_api_gateway.py # Test full chart pipeline
# View locally
open index.html # Main dashboard
open exports/charts/index.html # Chart data exports
open exports/index.html # Firewall exportsgoogleipmonitor/
โโโ .github/workflows/
โ โโโ monitor.yml # GitHub Actions (every 3 hours)
โโโ services/ # ๐ Microservices (v1.1.0)
โ โโโ aggregator_service.py # Data aggregation
โ โโโ chart_config_service.py # Chart configurations
โ โโโ chart_renderer_service.py # HTML rendering
โ โโโ chart_export_service.py # Data exports
โ โโโ chart_api_gateway.py # Service orchestrator
โโโ config/ # ๐ Configuration (v1.1.0)
โ โโโ chart_settings.json # Chart customization
โโโ cache/ # ๐ Service cache (v1.1.0)
โ โโโ metrics.json # Aggregated metrics
โ โโโ chart_configs.json # Chart.js configs
โโโ data/ # Historical IP snapshots
โ โโโ YYYY-MM-DD.json
โโโ exports/
โ โโโ charts/ # ๐ Chart data exports (v1.1.0)
โ โ โโโ index.html
โ โ โโโ historical_metrics.csv
โ โ โโโ historical_metrics.json
โ โ โโโ summary.md
โ โโโ index.html # Firewall export dashboard
โ โโโ iptables.sh # Linux firewall
โ โโโ aws-security-group.json # AWS format
โ โโโ azure-nsg.json # Azure format
โ โโโ cisco-acl.txt # Cisco IOS
โ โโโ pfsense-alias.txt # pfSense
โ โโโ mikrotik.rsc # MikroTik
โ โโโ plain-text.txt # Plain text
โ โโโ export.csv # CSV format
โ โโโ export.json # JSON format
โโโ monitor.py # Core monitoring logic
โโโ generate_report.py # Dashboard + charts generator
โโโ generate_firewall_rules.py # Firewall export generator
โโโ styles.css # Dashboard styling
โโโ index.html # Main dashboard (auto-generated)
โโโ CLAUDE.md # Architecture documentation
โโโ ROADMAP.md # ๐ Product roadmap (v1.1.0)
โโโ requirements.txt # Python dependencies
โโโ README.md # You are here!
- Edit
generate_firewall_rules.py - Add your generator method:
def generate_your_format(self, ipv4_prefixes, ipv6_prefixes):
rules = []
# Your format logic here
for ip in ipv4_prefixes:
rules.append(f"your-format: {ip}")
return "\n".join(rules)- Add to the
formatsdictionary ingenerate_all():
formats = {
'your-format.txt': self.generate_your_format,
# ... other formats
}- Update the exports index page to include your format
Beautiful dark-themed interface with real-time statistics, interactive charts, and change tracking.
Features:
- ๐ Live statistics cards (Previous Day, Current Day, Net Change, IPv4/IPv6)
- ๐ Interactive charts (Line, Bar, Pie charts with Chart.js)
- ๐จ Chrome-inspired dark theme
- ๐ฅ Integrated exports with 9 formats
- ๐ฑ Fully responsive design
๐ View Live Dashboard
Export and analyze historical IP range metrics.
Available Exports:
- ๐ CSV for Excel analysis
- ๐ฆ JSON for API consumption
- ๐ Markdown for documentation
๐ Browse Chart Data
Download ready-to-use firewall rules in your preferred format.
Available Formats:
- ๐ง iptables/ip6tables โข โ๏ธ AWS Security Group โข ๐ท Azure NSG
- ๐ Cisco ACL โข ๐ก๏ธ pfSense โข ๐ง MikroTik RouterOS
- ๐ Plain Text โข ๐ CSV โข ๐ฆ JSON
๐ Browse Exports
How often does it check for changes?
Every 3 hours (8 times per day). You can customize this in the workflow file.What firewall formats are supported?
Currently: iptables, AWS Security Group, Azure NSG, Cisco ACL, pfSense, MikroTik, CSV, JSON, and Plain Text. More formats can be added easily!Do I need Telegram to use this?
No! Telegram is optional. The dashboard and exports work without it. Just don't add the Telegram secrets.How do I import rules into my firewall?
Check the "Firewall Export Guide" section above for specific instructions for each format.Can I monitor other IP sources besides Google?
Yes! Add any JSON/text IP source to the `urls` dictionary in `monitor.py`.Will this use up my GitHub Actions quota?
No. With 2,000 free minutes/month and ~2 minutes per run, you use only 480 minutes/month (24% of quota).Can I run this on my own server?
Yes! Set up a cron job to run the Python scripts. But GitHub Actions is easier and free!How do I update to the latest version?
Sync your fork with the upstream repository, or manually copy new files from the main repo.Distributed under the MIT License. See LICENSE for more information.
- ๐ง Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
- ๐ Dashboard: Live Demo
- ๐ฅ Exports: Export Page
- Google Cloud IP Ranges
- GitHub Actions
- Telegram Bot API
- Roboto Font Family
- All contributors and users of this project
Made with โค๏ธ for the DevOps community
If you find this useful, please consider giving it a โญ๏ธ