forked from gta-online-nginx/GTAOnlineNginxProxy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install
22 lines (19 loc) · 725 Bytes
/
install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
cd /
apt-get purge bind9
apt-get purge apache2
IP=`curl -4 ifconfig.me`
echo $IP prod.cloud.rockstargames.com prod.ros.cloud.rockstargames.com > /etc/hosts2
apt-get update
apt-get install nginx dnsmasq
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
echo nameserver 4.2.2.1 >/etc/resolv.conf
echo nameserver 4.2.2.2 >>/etc/resolv.conf
echo nameserver 4.2.2.1 >> /etc/resolvconf/resolv.conf.d/head
echo nameserver 4.2.2.2 >> /etc/resolvconf/resolv.conf.d/head
service nginx restart
service dnsmasq restart
echo
echo "Your DNS server's public IP is: "$IP
echo "Your DNS server's eth0 IP is: "`/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'`