rules-save 7.81 KB
Newer Older
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
1 2 3 4 5 6 7
# rules-save generated by awall
*filter
:FORWARD DROP [0:0]
:INPUT DROP [0:0]
:OUTPUT DROP [0:0]
:icmp-routing - [0:0]
:logaccept-0 - [0:0]
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
8
:logaccept-1 - [0:0]
9 10
:logaccept-2 - [0:0]
:logaccept-3 - [0:0]
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
11 12 13
:logdrop-0 - [0:0]
:logdrop-1 - [0:0]
:logdrop-2 - [0:0]
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
14
:logdrop-3 - [0:0]
15 16
:logdrop-4 - [0:0]
:logdrop-5 - [0:0]
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
17
:logpass-0 - [0:0]
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
18
:logpass-1 - [0:0]
19 20
:logpass-2 - [0:0]
:logpass-3 - [0:0]
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
:logreject-0 - [0:0]
:logtarpit-0 - [0:0]
:tarpit - [0:0]
-A FORWARD -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A FORWARD -j ACCEPT
-A FORWARD -j ACCEPT
-A FORWARD -j logdrop-0
-A FORWARD 
-A FORWARD -j logreject-0
-A FORWARD -j logtarpit-0
-A FORWARD -j ACCEPT
-A FORWARD -j logdrop-1
-A FORWARD 
-A FORWARD -j ACCEPT
-A FORWARD -j DROP
-A FORWARD 
-A FORWARD -j logaccept-0
-A FORWARD -j logdrop-2
-A FORWARD -j logpass-0
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
40 41 42
-A FORWARD -j logaccept-1
-A FORWARD -j logdrop-3
-A FORWARD -j logpass-1
43 44 45 46 47 48 49 50 51
-A FORWARD -j logaccept-2
-A FORWARD -j logdrop-4
-A FORWARD -j logpass-2
-A FORWARD -j ACCEPT
-A FORWARD -j DROP
-A FORWARD 
-A FORWARD -j logaccept-3
-A FORWARD -j logdrop-5
-A FORWARD -j logpass-3
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
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
-A FORWARD -i eth0 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -i eth0 -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -i eth0 -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth0 -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth0 -o eth4 -j ACCEPT
-A FORWARD -i eth0 -o eth5 -j ACCEPT
-A FORWARD -i eth0 -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth0 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth4 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth5 -j ACCEPT
-A FORWARD -i eth1 -s 10.0.0.0/12 -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -i eth2 -s 10.1.0.0/12 -o eth0 -j ACCEPT
-A FORWARD -i eth3 -s 10.1.0.0/12 -o eth0 -j ACCEPT
-A FORWARD -i eth2 -s 10.1.0.0/12 -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -i eth3 -s 10.1.0.0/12 -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -i eth2 -s 10.1.0.0/12 -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth3 -s 10.1.0.0/12 -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth2 -s 10.1.0.0/12 -o eth4 -j ACCEPT
-A FORWARD -i eth2 -s 10.1.0.0/12 -o eth5 -j ACCEPT
-A FORWARD -i eth3 -s 10.1.0.0/12 -o eth4 -j ACCEPT
-A FORWARD -i eth3 -s 10.1.0.0/12 -o eth5 -j ACCEPT
-A FORWARD -i eth2 -s 10.1.0.0/12 -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -i eth3 -s 10.1.0.0/12 -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -i eth4 -o eth0 -j ACCEPT
-A FORWARD -i eth5 -o eth0 -j ACCEPT
-A FORWARD -i eth4 -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -i eth5 -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -i eth4 -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth4 -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth5 -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth5 -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -i eth4 -o eth4 -j ACCEPT
-A FORWARD -i eth4 -o eth5 -j ACCEPT
-A FORWARD -i eth5 -o eth4 -j ACCEPT
-A FORWARD -i eth5 -o eth5 -j ACCEPT
-A FORWARD -i eth4 -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -i eth5 -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -o eth0 -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -o eth2 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -o eth3 -d 10.1.0.0/12 -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -o eth4 -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -o eth5 -j ACCEPT
-A FORWARD -m policy --dir in --pol ipsec -m policy --dir out --pol ipsec -j ACCEPT
-A FORWARD -p icmp -j icmp-routing
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
102
-A INPUT -m limit --limit 12/minute -j ULOG
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
103
-A INPUT -j NFLOG --nflog-group 1 --nflog-size 128
104 105
-A INPUT -j TEE --gateway 10.0.0.2
-A INPUT -j TEE --gateway 10.0.0.1
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
106
-A INPUT -m limit --limit 1/second -j LOG
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
-A INPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -j ACCEPT
-A INPUT -j ACCEPT
-A INPUT -j logdrop-0
-A INPUT 
-A INPUT -j logreject-0
-A INPUT -j logtarpit-0
-A INPUT -j ACCEPT
-A INPUT -j logdrop-1
-A INPUT 
-A INPUT -j ACCEPT
-A INPUT -j DROP
-A INPUT 
-A INPUT -j logaccept-0
-A INPUT -j logdrop-2
-A INPUT -j logpass-0
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
124 125 126
-A INPUT -j logaccept-1
-A INPUT -j logdrop-3
-A INPUT -j logpass-1
127 128 129 130 131 132 133 134 135
-A INPUT -j logaccept-2
-A INPUT -j logdrop-4
-A INPUT -j logpass-2
-A INPUT -j ACCEPT
-A INPUT -j DROP
-A INPUT 
-A INPUT -j logaccept-3
-A INPUT -j logdrop-5
-A INPUT -j logpass-3
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
-A INPUT -i eth0 -j ACCEPT
-A INPUT -j ACCEPT
-A INPUT -p icmp -j icmp-routing
-A OUTPUT -m conntrack --ctstate ESTABLISHED -j ACCEPT
-A OUTPUT -o lo -j ACCEPT
-A OUTPUT -j ACCEPT
-A OUTPUT -j ACCEPT
-A OUTPUT -j logdrop-0
-A OUTPUT 
-A OUTPUT -j logreject-0
-A OUTPUT -j logtarpit-0
-A OUTPUT -j ACCEPT
-A OUTPUT -j logdrop-1
-A OUTPUT 
-A OUTPUT -j ACCEPT
-A OUTPUT -j DROP
-A OUTPUT 
-A OUTPUT -j logaccept-0
-A OUTPUT -j logdrop-2
-A OUTPUT -j logpass-0
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
156 157 158
-A OUTPUT -j logaccept-1
-A OUTPUT -j logdrop-3
-A OUTPUT -j logpass-1
159 160 161 162 163 164 165 166 167
-A OUTPUT -j logaccept-2
-A OUTPUT -j logdrop-4
-A OUTPUT -j logpass-2
-A OUTPUT -j ACCEPT
-A OUTPUT -j DROP
-A OUTPUT 
-A OUTPUT -j logaccept-3
-A OUTPUT -j logdrop-5
-A OUTPUT -j logpass-3
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
168
-A OUTPUT -m limit --limit 12/minute -j ULOG
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
169 170 171 172 173 174 175 176
-A OUTPUT -j ACCEPT
-A OUTPUT -o eth1 -d 10.0.0.0/12 -j ACCEPT
-A OUTPUT -p icmp -j icmp-routing
-A icmp-routing -p icmp --icmp-type 3 -j ACCEPT
-A icmp-routing -p icmp --icmp-type 11 -j ACCEPT
-A icmp-routing -p icmp --icmp-type 12 -j ACCEPT
-A logaccept-0 -m limit --limit 1/second -j LOG
-A logaccept-0 -j ACCEPT
177
-A logaccept-1 -j LOG
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
178
-A logaccept-1 -j ACCEPT
179 180 181 182 183
-A logaccept-2 -j TEE --gateway 10.0.0.1
-A logaccept-2 -j TEE --gateway 10.0.0.2
-A logaccept-2 -j ACCEPT
-A logaccept-3 -m limit --limit 12/minute -j ULOG
-A logaccept-3 -j ACCEPT
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
184 185 186 187 188 189
-A logdrop-0 -m limit --limit 1/second -j LOG
-A logdrop-0 -j DROP
-A logdrop-1 -m limit --limit 1/second -j LOG
-A logdrop-1 -j DROP
-A logdrop-2 -m limit --limit 1/second -j LOG
-A logdrop-2 -j DROP
190
-A logdrop-3 -j LOG
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
191
-A logdrop-3 -j DROP
192 193 194 195 196
-A logdrop-4 -j TEE --gateway 10.0.0.1
-A logdrop-4 -j TEE --gateway 10.0.0.2
-A logdrop-4 -j DROP
-A logdrop-5 -m limit --limit 12/minute -j ULOG
-A logdrop-5 -j DROP
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
197
-A logpass-0 -m limit --limit 1/second -j LOG
198 199 200 201
-A logpass-1 -j LOG
-A logpass-2 -j TEE --gateway 10.0.0.1
-A logpass-2 -j TEE --gateway 10.0.0.2
-A logpass-3 -m limit --limit 12/minute -j ULOG
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
202 203 204 205 206 207 208 209 210 211 212 213 214
-A logreject-0 -m limit --limit 1/second -j LOG
-A logreject-0 -j REJECT
-A logtarpit-0 -m limit --limit 1/second -j LOG
-A logtarpit-0 -j tarpit
-A tarpit -p tcp -j TARPIT
-A tarpit -j DROP
COMMIT
*mangle
:FORWARD ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
215 216 217 218 219 220
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth2 -d 10.1.0.0/12 -j MARK --set-mark 2
-A FORWARD -i eth1 -s 10.0.0.0/12 -o eth3 -d 10.1.0.0/12 -j MARK --set-mark 2
-A INPUT -j MARK --set-mark 3
-A OUTPUT -j MARK --set-mark 1
-A POSTROUTING -o eth1 -d 10.0.0.0/12 -j MARK --set-mark 3
-A PREROUTING -i eth0 -j MARK --set-mark 1
Kaarle Ritvanen's avatar
Kaarle Ritvanen committed
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
COMMIT
*nat
:INPUT ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
:awall-masquerade - [0:0]
-A INPUT -j MASQUERADE
-A OUTPUT -j REDIRECT
-A POSTROUTING -o eth1 -d 10.0.0.0/12 -j MASQUERADE
-A POSTROUTING -m set --match-set awall-masquerade src -j awall-masquerade
-A PREROUTING -i eth0 -j REDIRECT
-A PREROUTING -i eth1 -s 10.0.0.0/12 -j REDIRECT
-A awall-masquerade -m set ! --match-set awall-masquerade dst -j MASQUERADE
COMMIT
*raw
:OUTPUT ACCEPT [0:0]
:PREROUTING ACCEPT [0:0]
-A OUTPUT -j CT --notrack
-A OUTPUT -j CT --notrack
-A PREROUTING -j CT --notrack
-A PREROUTING -i eth0 -j CT --notrack
-A PREROUTING -i eth1 -s 10.0.0.0/12 -j CT --notrack
-A PREROUTING -m addrtype --dst-type LOCAL -j CT --notrack
COMMIT