-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathstart-web.sh
executable file
·21 lines (21 loc) · 1.03 KB
/
start-web.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
basepath=$(cd `dirname $0`; pwd)
cd $basepath
mkdir -p node_modules
cp -R ./douyu/* node_modules
iptables -t nat -F
#ip route add local default dev lo table 100
#ip rule add fwmark 1 lookup 100
ifconfig $1:2 192.168.200.1 netmask 255.255.255.0
sysctl -w net.ipv4.ip_forward=1
sysctl -p
iptables -t nat -A PREROUTING --ipv4 -s 192.168.200.1 -j RETURN
iptables -t nat -A PREROUTING -p tcp -s 192.168.200.0/24 --dport 1935 -j DNAT --to-destination 192.168.200.1:1935
#iptables -t nat -A PREROUTING -s 192.168.200.0/24 -j ps4broadcast
iptables -t nat -A PREROUTING -p tcp -s 192.168.200.0/24 --dport 6667 -j DNAT --to-destination 192.168.200.1:6667
#iptables -t nat -A PREROUTING --ipv4 -s 192.168.200.0/24 -p tcp -j DNAT --to-destination 192.168.200.1:20000
#iptables -t mangle -A PREROUTING -p udp -j TPROXY --on-port 20000 --tproxy-mark 0x01/0x01
iptables -t filter -A FORWARD -s 192.168.200.0/24 -j ACCEPT
iptables -t filter -A FORWARD -d 192.168.200.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING --ipv4 -j MASQUERADE
node $basepath/start.js