|
1 | | -# -- Setup firewall configuration |
2 | | -uci set firewall.@defaults[0].syn_flood=1 |
3 | | -uci set firewall.@defaults[0].input=ACCEPT |
4 | | -uci set firewall.@defaults[0].output=ACCEPT |
5 | | -uci set firewall.@defaults[0].forward=ACCEPT |
6 | | - |
7 | | -uci add firewall zone |
8 | | -uci set firewall.@zone[-1]=zone |
9 | | -uci set firewall.@zone[-1].name=usb |
10 | | -uci add_list firewall.@zone[-1].network='usb' |
11 | | -uci set firewall.@zone[-1].input=ACCEPT |
12 | | -uci set firewall.@zone[-1].output=ACCEPT |
13 | | -uci set firewall.@zone[-1].forward=ACCEPT |
14 | | -uci set firewall.@zone[-1].masq=1 |
15 | | -uci set firewall.@zone[-1].mtu_fix=1 |
16 | | - |
17 | | -uci add firewall forwarding |
18 | | -uci set firewall.@forwarding[-1].src=lan |
19 | | -uci set firewall.@forwarding[-1].dest=usb |
20 | | - |
21 | | -uci add firewall forwarding |
22 | | -uci set firewall.@forwarding[-1].src=usb |
23 | | -uci set firewall.@forwarding[-1].dest=lan |
24 | | - |
25 | | -uci add firewall zone |
26 | | -uci set firewall.@zone[-1]=zone |
27 | | -uci set firewall.@zone[-1].name=wwan |
28 | | -uci add_list firewall.@zone[-1].network=wwan |
29 | | -uci add_list firewall.@zone[-1].network=wwan6 |
30 | | -uci set firewall.@zone[-1].input=ACCEPT |
31 | | -uci set firewall.@zone[-1].output=ACCEPT |
32 | | -uci set firewall.@zone[-1].forward=ACCEPT |
33 | | -uci set firewall.@zone[-1].masq=1 |
34 | | -uci set firewall.@zone[-1].mtu_fix=1 |
35 | | - |
36 | | -uci add firewall forwarding |
37 | | -uci set firewall.@forwarding[-1].src=lan |
38 | | -uci set firewall.@forwarding[-1].dest=wwan |
39 | | - |
40 | | -uci add firewall forwarding |
41 | | -uci set firewall.@forwarding[-1].src=wwan |
42 | | -uci set firewall.@forwarding[-1].dest=lan |
43 | | - |
44 | | -uci add firewall zone |
45 | | -uci set firewall.@zone[-1].name=wan |
46 | | -uci add_list firewall.@zone[-1].network='wan' |
47 | | -uci add_list firewall.@zone[-1].network='wan6' |
48 | | -uci set firewall.@zone[-1].input=ACCEPT |
49 | | -uci set firewall.@zone[-1].output=ACCEPT |
50 | | -uci set firewall.@zone[-1].forward=ACCEPT |
51 | | -uci set firewall.@zone[-1].masq=1 |
52 | | -uci set firewall.@zone[-1].mtu_fix=1 |
53 | | - |
54 | | -uci add firewall forwarding |
55 | | -uci set firewall.@forwarding[-1].src=lan |
56 | | -uci set firewall.@forwarding[-1].dest=wan |
57 | | - |
58 | | -uci add firewall forwarding |
59 | | -uci set firewall.@forwarding[-1].src=wan |
60 | | -uci set firewall.@forwarding[-1].dest=lan |
61 | | - |
62 | | -uci add firewall allowssh |
63 | | -uci set firewall.allowssh=rule |
64 | | -uci set firewall.allowssh.name='Allow-SSH' |
65 | | -uci set firewall.allowssh.src='wan' |
66 | | -uci set firewall.allowssh.proto='tcp' |
67 | | -uci set firewall.allowssh.dest_port='22' |
68 | | -uci set firewall.allowssh.target='ACCEPT' |
69 | | -uci set firewall.allowssh.family='ipv4' |
70 | | -uci set firewall.allowssh.enabled='0' |
71 | | - |
72 | | -uci add firewall allowui |
73 | | -uci set firewall.allowui=rule |
74 | | -uci set firewall.allowui.name='Allow-WEB' |
75 | | -uci set firewall.allowui.src='wan' |
76 | | -uci set firewall.allowui.proto='tcp' |
77 | | -uci set firewall.allowui.dest_port='1471' |
78 | | -uci set firewall.allowui.target='ACCEPT' |
79 | | -uci set firewall.allowui.family='ipv4' |
80 | | -uci set firewall.allowui.enabled='0' |
81 | | - |
82 | | -uci add firewall allowws |
83 | | -uci set firewall.allowws=rule |
84 | | -uci set firewall.allowws.name='Allow-WEB-WS' |
85 | | -uci set firewall.allowws.src='wan' |
86 | | -uci set firewall.allowws.proto='tcp' |
87 | | -uci set firewall.allowws.dest_port='1337' |
88 | | -uci set firewall.allowws.target='ACCEPT' |
89 | | -uci set firewall.allowws.family='ipv4' |
90 | | -uci set firewall.allowws.enabled='1' |
91 | | - |
92 | | -uci commit firewall |
93 | | - |
94 | | -exit 0 |
| 1 | +# -- Setup firewall configuration |
| 2 | +uci set firewall.@defaults[0].syn_flood=1 |
| 3 | +uci set firewall.@defaults[0].input=ACCEPT |
| 4 | +uci set firewall.@defaults[0].output=ACCEPT |
| 5 | +uci set firewall.@defaults[0].forward=ACCEPT |
| 6 | + |
| 7 | +uci add firewall zone |
| 8 | +uci set firewall.@zone[-1]=zone |
| 9 | +uci set firewall.@zone[-1].name=usb |
| 10 | +uci add_list firewall.@zone[-1].network='usb' |
| 11 | +uci set firewall.@zone[-1].input=ACCEPT |
| 12 | +uci set firewall.@zone[-1].output=ACCEPT |
| 13 | +uci set firewall.@zone[-1].forward=ACCEPT |
| 14 | +uci set firewall.@zone[-1].masq=1 |
| 15 | +uci set firewall.@zone[-1].mtu_fix=1 |
| 16 | + |
| 17 | +uci add firewall forwarding |
| 18 | +uci set firewall.@forwarding[-1].src=lan |
| 19 | +uci set firewall.@forwarding[-1].dest=usb |
| 20 | + |
| 21 | +uci add firewall forwarding |
| 22 | +uci set firewall.@forwarding[-1].src=usb |
| 23 | +uci set firewall.@forwarding[-1].dest=lan |
| 24 | + |
| 25 | +uci add firewall zone |
| 26 | +uci set firewall.@zone[-1]=zone |
| 27 | +uci set firewall.@zone[-1].name=wwan |
| 28 | +uci add_list firewall.@zone[-1].network=wwan |
| 29 | +uci add_list firewall.@zone[-1].network=wwan6 |
| 30 | +uci set firewall.@zone[-1].input=ACCEPT |
| 31 | +uci set firewall.@zone[-1].output=ACCEPT |
| 32 | +uci set firewall.@zone[-1].forward=ACCEPT |
| 33 | +uci set firewall.@zone[-1].masq=1 |
| 34 | +uci set firewall.@zone[-1].mtu_fix=1 |
| 35 | + |
| 36 | +uci add firewall forwarding |
| 37 | +uci set firewall.@forwarding[-1].src=lan |
| 38 | +uci set firewall.@forwarding[-1].dest=wwan |
| 39 | + |
| 40 | +uci add firewall forwarding |
| 41 | +uci set firewall.@forwarding[-1].src=wwan |
| 42 | +uci set firewall.@forwarding[-1].dest=lan |
| 43 | + |
| 44 | +uci add firewall zone |
| 45 | +uci set firewall.@zone[-1].name=wan |
| 46 | +uci add_list firewall.@zone[-1].network='wan' |
| 47 | +uci add_list firewall.@zone[-1].network='wan6' |
| 48 | +uci set firewall.@zone[-1].input=ACCEPT |
| 49 | +uci set firewall.@zone[-1].output=ACCEPT |
| 50 | +uci set firewall.@zone[-1].forward=ACCEPT |
| 51 | +uci set firewall.@zone[-1].masq=1 |
| 52 | +uci set firewall.@zone[-1].mtu_fix=1 |
| 53 | + |
| 54 | +uci add firewall forwarding |
| 55 | +uci set firewall.@forwarding[-1].src=lan |
| 56 | +uci set firewall.@forwarding[-1].dest=wan |
| 57 | + |
| 58 | +uci add firewall forwarding |
| 59 | +uci set firewall.@forwarding[-1].src=wan |
| 60 | +uci set firewall.@forwarding[-1].dest=lan |
| 61 | + |
| 62 | +uci add firewall allowssh |
| 63 | +uci set firewall.allowssh=rule |
| 64 | +uci set firewall.allowssh.name='Allow-SSH' |
| 65 | +uci set firewall.allowssh.src='wan' |
| 66 | +uci set firewall.allowssh.proto='tcp' |
| 67 | +uci set firewall.allowssh.dest_port='22' |
| 68 | +uci set firewall.allowssh.target='ACCEPT' |
| 69 | +uci set firewall.allowssh.family='ipv4' |
| 70 | +uci set firewall.allowssh.enabled='0' |
| 71 | + |
| 72 | +uci add firewall allowui |
| 73 | +uci set firewall.allowui=rule |
| 74 | +uci set firewall.allowui.name='Allow-WEB' |
| 75 | +uci set firewall.allowui.src='wan' |
| 76 | +uci set firewall.allowui.proto='tcp' |
| 77 | +uci set firewall.allowui.dest_port='1471' |
| 78 | +uci set firewall.allowui.target='ACCEPT' |
| 79 | +uci set firewall.allowui.family='ipv4' |
| 80 | +uci set firewall.allowui.enabled='0' |
| 81 | + |
| 82 | +uci add firewall allowws |
| 83 | +uci set firewall.allowws=rule |
| 84 | +uci set firewall.allowws.name='Allow-WEB-WS' |
| 85 | +uci set firewall.allowws.src='wan' |
| 86 | +uci set firewall.allowws.proto='tcp' |
| 87 | +uci set firewall.allowws.dest_port='1337' |
| 88 | +uci set firewall.allowws.target='ACCEPT' |
| 89 | +uci set firewall.allowws.family='ipv4' |
| 90 | +uci set firewall.allowws.enabled='1' |
| 91 | + |
| 92 | +uci commit firewall |
| 93 | + |
| 94 | +exit 0 |
0 commit comments