FROM ubuntu:22.04

# Avoid interactive prompts during package install
ENV DEBIAN_FRONTEND=noninteractive

# Install required packages
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    python3 \
    curl \
    iproute2 \
    iptables \
    net-tools \
    tcpdump \
    iputils-ping \
    arp-scan && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Enable packet forwarding
RUN echo "net.ipv4.ip_forward=1" >> /etc/sysctl.conf && \
    echo "net.ipv6.conf.all.forwarding=1" >> /etc/sysctl.conf

# Apply sysctl settings at container startup
CMD sysctl -p && tail -f /dev/null
