User Tools

Site Tools


iut:projtut:captive:scripts

chilli.sh

#! /bin/bash
cd /home/chilli/scripts/
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Chillispot configuration..."
echo "~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Setting IP Forward to 1 :"
echo 1 > /proc/sys/net/ipv4/ip_forward
more /proc/sys/net/ipv4/ip_forward
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Setting rules in IPTables"
./iptables.sh
echo "~~~~~~~~~~~~~~~~~~~~~~~~"
echo "General rules"
echo "~~~~~~~~~~~~"
iptables -L
echo "~~~~~~~~~~~~~~~~~~~~~~~~"
echo "NAT rules"
echo "~~~~~~~~~~~~"
iptables -t nat -L
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Restarting services Bind & Chilli :"
./services.sh
echo "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~"
echo "Showing log (Chilli only).."
./log.sh
exit

iptables.sh

#! /bin/bash
iptables -F
iptables -t nat -F
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
exit

services.ch

#! /bin/bash
/etc/init.d/bind9 stop
/etc/init.d/bind9 start
/etc/init.d/chilli stop
sleep 1
/etc/init.d/chilli start
exit

log.sh

#! /bin/bash
tail -f /var/log/daemon.log | grep "chillispot"
exit
iut/projtut/captive/scripts.txt · Last modified: 2013/12/25 16:47 (external edit)