A quick flask app that can be spun up on a vm in order to grab ip and location.
This repository contains a Flask application that serves as a free alternative to URL shortening and landing page services like Bitly. It's designed to quickly spin up a landing page and track visits, including IP addresses and approximate locations.
- Flask web server for serving landing pages
- IP and location tracking for visitors
- Easy deployment on VPS (Virtual Private Server)
Before you begin, ensure you have met the following requirements:
- A VPS (e.g., DigitalOcean droplet, AWS EC2 instance)
- Domain name (optional, for custom domain setup)
-
Update your package list:
sudo apt update
-
Install Python and pip:
sudo apt install python3 python3-pip
-
Install Git:
sudo apt install git
-
Clone the repository:
git clone https://github.com/pronsSec/quick-ip-app.git
-
Navigate to the project directory:
cd your-repository-name
-
Install the required Python packages:
pip install -r requirements.txt
-
Start the Flask application:
python3 app.py
If you own a domain and wish to connect it to your landing page application, follow these steps:
-
Log in to your domain registrar's website (e.g., GoDaddy, Namecheap).
-
Navigate to your domain's DNS settings.
-
Create an
A
record pointing to your VPS's IP address.- Host: The subdomain you want to use (e.g.,
@
for root domain,www
for www subdomain). - Points to: Your VPS's IP address.
- TTL: Time to live (you can leave this as the default).
- Host: The subdomain you want to use (e.g.,
If you're using a web server like Nginx or Apache, ensure that it's configured to serve your Flask application on the domain you've set up.
Consider setting up an SSL/TLS certificate for your domain to secure the connection:
- You can obtain a free certificate from Let's Encrypt.
- Follow the instructions to set up the certificate on your server.
Once set up, your landing page will be accessible at the domain you've configured. Visitors' IP addresses and approximate locations will be logged, allowing you to track visits.
Contributions to this project are welcome! Please fork the repository and create a pull request with your improvements.
This project is open-source and available under the MIT License.