Commit 05ade3f9 authored by markus's avatar markus

Initial commit

parents
Pipeline #27 canceled with stages
# DNS Visualisation
This repository contains a set of config files and scripts for visualising network traffic seen by a router, especially DNS queries.
<head>
<meta http-equiv="refresh" content="1;" />
</head>
<body>
<img src="graph.svg" width="100%" height="100%"/>
</body>
log-facility=/var/log/dnsmasq.log
interface=wlan0
dhcp-range=10.0.0.10,10.0.0.250,12h
dhcp-option=3,10.0.0.1
dhcp-option=6,10.0.0.1
log-queries=extra
#!/usr/bin/env bash
while true
do
awk ' BEGIN {printf "digraph dns_graph {\n"} /query/ {print " \""$10"\" -> \""$8"\";"; ++cnt} END {printf " \"Total\" -> \"" cnt "\";\n}\n"}' /var/log/dnsmasq.log > res.dot && dot -Tsvg -Ksfdp -p graph.svg res.dot
sleep 0.5
done
interface=wlan0
driver=nl80211
ssid=WLAN-8243
channel=6
wpa=2
auth_algs=1
rsn_pairwise=CCMP
wpa_key_mgmt=WPA-PSK
wpa_passphrase=einPasswort
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i wlan0 -o eth0 -j ACCEPT
COMMIT
#!/usr/bin/env bash
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
ip addr add 10.0.0.1/24 dev wlan0
echo '1' > /proc/sys/net/ipv4/ip_forward
nmcli r wifi off
rfkill unblock wifi
apt-get install -y hostapd dnsmasq etherape
systemctl unmask hostapd
mkdir -p /etc/hostapd
cp hostapd.conf /etc/hostapd/
cp dnsmasq.conf /etc/
systemctl start hostapd
systemctl start dnsmasq
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment