Skip to content

DOULOOP/aaia-batch-files

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AAIA - Automated Access Point Installation & Automation

A Linux-based Wi-Fi Access Point setup automation tool that configures your system to create a virtual wireless access point using hostapd, dnsmasq, and iptables.

Overview

This project provides both automated and manual setup options for creating a wireless access point on Linux systems (tested on Debian/Ubuntu-based distributions). It creates a virtual interface (ap0) that operates alongside your existing wireless connection (wlan0), allowing your device to act as both a Wi-Fi client and access point simultaneously.

Features

  • Virtual Interface Creation: Creates a virtual ap0 interface without interfering with your primary wlan0 connection
  • DHCP Server: Automatic IP address assignment for connected clients (192.168.50.50-150)
  • NAT & Routing: Internet sharing from primary connection to access point clients
  • WPA2 Security: Secure wireless network with custom SSID and password
  • Persistent Configuration: Services and settings survive system reboots

Requirements

  • Linux system (Debian/Ubuntu-based)
  • Wireless adapter supporting AP mode
  • Root/sudo privileges
  • Required packages: hostapd, dnsmasq, iptables, iw

Installation

Automated Setup (Recommended)

Run the setup script with your desired SSID and password:

chmod +x setup_ap.sh
./setup_ap.sh "YOUR_SSID" "YOUR_PASSWORD"

Example:

./setup_ap.sh "MyAccessPoint" "SecurePassword123"

Manual Setup

For step-by-step manual configuration, refer to manuel_setup.txt which provides detailed instructions for:

  1. Installing required packages
  2. Creating virtual interface
  3. Configuring DHCP (dnsmasq)
  4. Configuring access point (hostapd)
  5. Setting up NAT and IP forwarding
  6. Making configurations persistent

Network Configuration

  • Access Point IP: 192.168.50.1
  • DHCP Range: 192.168.50.50 - 192.168.50.150
  • Subnet Mask: 255.255.255.0
  • Lease Time: 12 hours
  • Channel: 6 (2.4 GHz)
  • Security: WPA2-PSK

How It Works

  1. Virtual Interface: Creates ap0 as a virtual wireless interface
  2. DHCP Server: dnsmasq provides IP addresses to connecting clients
  3. Access Point: hostapd manages the wireless access point functionality
  4. NAT & Routing: iptables rules enable internet sharing from wlan0 to ap0
  5. IP Forwarding: Kernel parameter enables packet forwarding between interfaces

Verification

After setup, verify the access point is running:

# Check interface status
ip addr show ap0

# Check hostapd service
sudo systemctl status hostapd

# Check dnsmasq service
sudo systemctl status dnsmasq

# View connected clients
sudo iw dev ap0 station dump

Troubleshooting

  • Interface not created: Ensure your wireless adapter supports AP mode
    iw list | grep "Supported interface modes" -A 8
  • Services failing: Check logs
    sudo journalctl -u hostapd -e
    sudo journalctl -u dnsmasq -e
  • No internet on clients: Verify IP forwarding and iptables rules
    cat /proc/sys/net/ipv4/ip_forward  # Should output: 1
    sudo iptables -t nat -L -n -v

File Structure

  • setup_ap.sh - Automated setup script
  • manuel_setup.txt - Step-by-step manual configuration guide
  • README.md - This file

License

This project is provided as-is for educational and practical purposes.

Contributing

Contributions, issues, and feature requests are welcome!

Notes

  • The setup requires both wlan0 (for internet connection) and creates ap0 (for access point)
  • Modifications may be needed for different network interfaces (e.g., wlan1 instead of wlan0)
  • Ensure your primary wireless connection is established before running the setup
  • Some systems may require additional driver support for virtual interface creation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages