about summary refs log tree commit diff stats
path: root/core/conf
diff options
context:
space:
mode:
Diffstat (limited to 'core/conf')
-rw-r--r--core/conf/iptables/ipt-client.sh20
-rw-r--r--core/conf/iptables/ipt-firewall.sh6
2 files changed, 24 insertions, 2 deletions
diff --git a/core/conf/iptables/ipt-client.sh b/core/conf/iptables/ipt-client.sh
index 65df9e4..77de218 100644
--- a/core/conf/iptables/ipt-client.sh
+++ b/core/conf/iptables/ipt-client.sh
@@ -19,13 +19,21 @@ $IPT -A INPUT -i ${PUB_IF} -j cli_https_in
 $IPT -A INPUT -i ${PUB_IF} -j cli_git_in
 $IPT -A INPUT -i ${PUB_IF} -j cli_ssh_in
 $IPT -A INPUT -i ${PUB_IF} -j srv_icmp
+$IPT -A INPUT -i ${PUB_IF} -j srv_ntp
 $IPT -A INPUT -i ${PUB_IF} -j cli_pops_in
 $IPT -A INPUT -i ${PUB_IF} -j cli_smtps_in
 $IPT -A INPUT -i ${PUB_IF} -j cli_irc_in
 $IPT -A INPUT -i ${PUB_IF} -j cli_ftp_in
 $IPT -A INPUT -i ${PUB_IF} -j cli_gpg_in
-$IPT -A INPUT -i ${PUB_IF} -p udp --sport 520 --dport 520 -j ACCEPT
+$IPT -A INPUT -i ${PUB_IF} -p udp --sport 520 --dport 520 -j DROP
 
+$IPT -A INPUT -p tcp --dport 1024:65535 --sport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
+$IPT -A INPUT -p udp --dport 1024:65535 --sport 1024:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
+
+# allow all established and related
+$IPT -A INPUT -p tcp --dport 1024:65535 --sport 1:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
+$IPT -A INPUT -p udp --dport 1024:65535 --sport 1:65535 -m state --state ESTABLISHED,RELATED -j ACCEPT
+$IPT -A INPUT -p icmp -j ACCEPT
 
 ####### Output Chain ######
 $IPT -A OUTPUT -j blocker
@@ -36,12 +44,20 @@ $IPT -A OUTPUT -o ${PUB_IF} -j cli_ssh_out
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_git_out
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_git_out
 $IPT -A OUTPUT -o ${PUB_IF} -j srv_icmp
+$IPT -A OUTPUT -o ${PUB_IF} -j srv_ntp
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_pops_out
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_smtps_out
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_irc_out
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_ftp_out
 $IPT -A OUTPUT -o ${PUB_IF} -j cli_gpg_out
-$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 1024:655335 --dport 1024:65535 -j ACCEPT
+
+$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 1024:65535 -j ACCEPT
+$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 1024:65535 --dport 1024:65535 -j ACCEPT
+
+# allow all out (make nmap and others happy)
+$IPT -A OUTPUT -o ${PUB_IF} -p udp --sport 1024:65535 --dport 1:65535 -j ACCEPT
+$IPT -A OUTPUT -o ${PUB_IF} -p tcp --sport 1024:65535 --dport 1:65535 -j ACCEPT
+$IPT -A OUTPUT -p icmp -j ACCEPT
 
 ## log everything else and drop
 ipt_log
diff --git a/core/conf/iptables/ipt-firewall.sh b/core/conf/iptables/ipt-firewall.sh
index 12c3834..086b864 100644
--- a/core/conf/iptables/ipt-firewall.sh
+++ b/core/conf/iptables/ipt-firewall.sh
@@ -18,6 +18,7 @@ ipt_clear () {
     iptables -N srv_dhcp
     iptables -N srv_rip
     iptables -N srv_icmp
+    iptables -N srv_ntp
     iptables -N srv_dns_in
     iptables -N srv_dns_out
     iptables -N srv_http_in
@@ -251,6 +252,11 @@ ipt_tables () {
     ####### ICMP Server
     $IPT -A srv_icmp -p icmp -j ACCEPT
     $IPT -A srv_icmp -j RETURN
+
+    ####### NTP Client and Server
+    $IPT -A srv_ntp -p udp --sport 123 --dport 123 -j ACCEPT
+    $IPT -A srv_ntp -j RETURN
+
 }
 
 
vious revision' href='/danisanti/profani-tty/blame/DESIGN?id=0e3f7ac00696c16a6152c97fb62c9f02f8e9d8bd'>^
278cd9dd ^
95dbb68b ^







278cd9dd ^
95dbb68b ^
1b717024 ^
95dbb68b ^






1b717024 ^
95dbb68b ^





1b717024 ^
95dbb68b ^



















1b717024 ^
95dbb68b ^

1b717024 ^
95dbb68b ^





1b717024 ^
95dbb68b ^










1b717024 ^
95dbb68b ^
1b717024 ^
95dbb68b ^















1b717024 ^
95dbb68b ^




1b717024 ^
95dbb68b ^








1b717024 ^
95dbb68b ^






1b717024 ^

95dbb68b ^








7e620763 ^

95dbb68b ^
1b717024 ^
7e620763 ^










2429d23f ^
7e620763 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183