mirror of
https://gitlab.com/hacklab01/pivilion.git
synced 2025-04-29 16:47:17 +00:00
Upload New File
This commit is contained in:
parent
01d553ee25
commit
5252ac87a5
20
home/pi/pivilion/config/rc.hotspot
Normal file
20
home/pi/pivilion/config/rc.hotspot
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
service apache2 start
|
||||
sleep 1
|
||||
ifconfig wlan0 down
|
||||
ifconfig wlan0 up
|
||||
sleep 1
|
||||
hostapd -B /etc/hostapd/hostapd.conf
|
||||
sleep 2
|
||||
ifconfig br0 up
|
||||
ifconfig br0 10.1.1.1 netmask 255.255.255.0
|
||||
sysctl net.ipv4.ip_forward=1
|
||||
iptables --flush
|
||||
iptables -t nat --flush
|
||||
iptables -t nat -A PREROUTING -i br0 -p udp -m udp --dport 53 -j DNAT --to-destination 10.1.1.1:53
|
||||
iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 80 -j DNAT --to-destination 10.1.1.1:80
|
||||
iptables -t nat -A PREROUTING -i br0 -p tcp -m tcp --dport 443 -j DNAT --to-destination 10.1.1.1:80
|
||||
iptables -t nat -A POSTROUTING -j MASQUERADE
|
||||
service dnsmasq start
|
||||
exit 0
|
Loading…
x
Reference in New Issue
Block a user