Line 1... |
Line 1... |
1 |
#!/bin/bash
|
1 |
#!/bin/bash
|
2 |
# $Id: alcasar-iptables.sh 2841 2020-06-28 21:49:00Z rexy $
|
2 |
# $Id: alcasar-iptables.sh 2844 2020-07-04 15:21:55Z rexy $
|
3 |
# Script de mise en place des regles du parefeu d'Alcasar (mode normal)
|
3 |
# Script de mise en place des regles du parefeu d'Alcasar (mode normal)
|
4 |
# This script writes the netfilter rules for ALCASAR
|
4 |
# This script writes the netfilter rules for ALCASAR
|
5 |
# Rexy - 3abtux - CPN
|
5 |
# Rexy - 3abtux - CPN
|
6 |
#
|
6 |
#
|
7 |
# Reminders
|
7 |
# Reminders
|
Line 170... |
Line 170... |
170 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8080 -j NFLOG --nflog-group 1 --nflog-prefix "RULE direct-proxy -- DENY "
|
170 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8080 -j NFLOG --nflog-group 1 --nflog-prefix "RULE direct-proxy -- DENY "
|
171 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp -m tcp --dport 8080 -j MARK --set-mark 1
|
171 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp -m tcp --dport 8080 -j MARK --set-mark 1
|
172 |
# 8090 = ipset av_wl + av
|
172 |
# 8090 = ipset av_wl + av
|
173 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8090 -j NFLOG --nflog-group 1 --nflog-prefix "RULE direct-proxy -- DENY "
|
173 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8090 -j NFLOG --nflog-group 1 --nflog-prefix "RULE direct-proxy -- DENY "
|
174 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp -m tcp --dport 8090 -j MARK --set-mark 2
|
174 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp -m tcp --dport 8090 -j MARK --set-mark 2
|
175 |
# 8443 = tranparent HTTPS for ipsets av_bl + av_wl + av
|
175 |
# 8443 = tranparent HTTPS for ipsets av_bl + av_wl + av (future version)
|
176 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8443 -j NFLOG --nflog-group 1 --nflog-prefix "RULE direct-proxy -- DENY "
|
176 |
#$IPTABLES -A PREROUTING -t nat -i $TUNIF -p tcp -d $PRIVATE_IP -m tcp --dport 8443 -j NFLOG --nflog-group 1 --nflog-prefix "RULE direct-proxy -- DENY "
|
177 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp -m tcp --dport 8443 -j MARK --set-mark 6
|
177 |
#$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp -m tcp --dport 8443 -j MARK --set-mark 6
|
178 |
|
178 |
|
179 |
# Marquage des paquets qui tentent d'accéder directement aux ports d'écoute DNS (UNBOUND) pour pouvoir les rejeter en INPUT
|
179 |
# Marquage des paquets qui tentent d'accéder directement aux ports d'écoute DNS (UNBOUND) pour pouvoir les rejeter en INPUT
|
180 |
# Mark the direct attempts to DNS ports (UNBOUND) in order to REJECT them in INPUT rules
|
180 |
# Mark the direct attempts to DNS ports (UNBOUND) in order to REJECT them in INPUT rules
|
181 |
# 54 = ipset av_bl
|
181 |
# 54 = ipset av_bl
|
182 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp --dport 54 -j MARK --set-mark 3
|
182 |
$IPTABLES -A PREROUTING -t mangle -i $TUNIF -d $PRIVATE_IP -p tcp --dport 54 -j MARK --set-mark 3
|
Line 198... |
Line 198... |
198 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src -p tcp --dport domain -j REDIRECT --to-port 55
|
198 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src -p tcp --dport domain -j REDIRECT --to-port 55
|
199 |
# 53 = all other users
|
199 |
# 53 = all other users
|
200 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF ! -d $PRIVATE_IP -p udp --dport domain -j REDIRECT --to-port 53
|
200 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF ! -d $PRIVATE_IP -p udp --dport domain -j REDIRECT --to-port 53
|
201 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF ! -d $PRIVATE_IP -p tcp --dport domain -j REDIRECT --to-port 53
|
201 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF ! -d $PRIVATE_IP -p tcp --dport domain -j REDIRECT --to-port 53
|
202 |
|
202 |
|
203 |
# Redirection des requêtes HTTP des usagers vers E2guardian
|
- |
|
204 |
# Redirect outbound users HTTP requests to E2guardian
|
- |
|
205 |
# 8080 = ipset av_bl
|
- |
|
206 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport http -j REDIRECT --to-port 8080
|
- |
|
207 |
# 8090 = ipset av_wl & av
|
- |
|
208 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src ! -d $PRIVATE_IP -p tcp --dport http -j REDIRECT --to-port 8090
|
- |
|
209 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av src ! -d $PRIVATE_IP -p tcp --dport http -j REDIRECT --to-port 8090
|
- |
|
210 |
|
- |
|
211 |
# Redirection des requêtes HTTPS sortantes des usagers av_bl + av_wl + av vers E2Guardian
|
- |
|
212 |
# Redirect outbound HTTPS requests of av_bl + av_wl + av users to E2Guardian
|
- |
|
213 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport https -j REDIRECT --to-port 8443
|
- |
|
214 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport https -j REDIRECT --to-port 8443
|
- |
|
215 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport https -j REDIRECT --to-port 8443
|
- |
|
216 |
|
- |
|
217 |
# Journalisation HTTP_Internet des usagers 'av_bl' (paquets SYN uniquement). Les autres protocoles sont journalisés en FORWARD par netflow.
|
- |
|
218 |
# Log Internet HTTP of 'av_bl' users" (only syn packets). Other protocols are logged in FORWARD by netflow
|
- |
|
219 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src ! -d $PRIVATE_IP -p tcp --dport http -m conntrack --ctstate NEW -j NFLOG --nflog-group 1 --nflog-prefix "RULE F_http -- ACCEPT "
|
- |
|
220 |
|
- |
|
221 |
# Redirection HTTP des usagers 'av_bl' cherchant à joindre les IP de la blacklist vers ALCASAR (page 'accès interdit')
|
203 |
# Redirection HTTP des usagers 'av_bl' cherchant à joindre les IP de la blacklist vers ALCASAR (page 'accès interdit')
|
222 |
# Redirect HTTP of 'av_bl' users who want blacklist IP to ALCASAR ('access denied' page)
|
204 |
# Redirect HTTP of 'av_bl' users who want blacklist IP to ALCASAR ('access denied' page)
|
223 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src -m set --match-set bl_ip_blocked dst -p tcp --dport http -j REDIRECT --to-port 80
|
205 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src -m set --match-set bl_ip_blocked dst -p tcp --dport http -j REDIRECT --to-port 80
|
224 |
|
206 |
|
225 |
# Redirection HTTP des usagers 'av_wl' cherchant à joindre les IP qui ne sont pas dans la WL vers ALCASAR (page 'accès interdit')
|
207 |
# Redirection HTTP des usagers 'av_wl' cherchant à joindre les IP qui ne sont pas dans la WL vers ALCASAR (page 'accès interdit')
|
226 |
# Redirect HTTP of 'av_wl' users who want IP not in the WL to ALCASAR ('access denied' page)
|
208 |
# Redirect HTTP of 'av_wl' users who want IP not in the WL to ALCASAR ('access denied' page)
|
227 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src -m set ! --match-set wl_ip_allowed dst -p tcp --dport http -j REDIRECT --to-port 80
|
209 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src -m set ! --match-set wl_ip_allowed dst -p tcp --dport http -j REDIRECT --to-port 80
|
228 |
|
210 |
|
- |
|
211 |
# Journalisation des usagers "av_bl + av_wl + av" (paquets SYN uniquement). Les autres protocoles sont journalisés en FORWARD par netflow.
|
- |
|
212 |
# accounting of "av_bl + av_wl + av" users (only syn packets). Other protocols are logged in FORWARD by netflow
|
- |
|
213 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src ! -d $PRIVATE_IP -p tcp --dport http -m conntrack --ctstate NEW -j NFLOG --nflog-group 1 --nflog-prefix "RULE F_http -- ACCEPT "
|
- |
|
214 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src ! -d $PRIVATE_IP -p tcp --dport http -m conntrack --ctstate NEW -j NFLOG --nflog-group 1 --nflog-prefix "RULE F_http -- ACCEPT "
|
- |
|
215 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av src ! -d $PRIVATE_IP -p tcp --dport http -m conntrack --ctstate NEW -j NFLOG --nflog-group 1 --nflog-prefix "RULE F_http -- ACCEPT "
|
- |
|
216 |
|
- |
|
217 |
# Redirection des requêtes HTTP des usagers "av_bl + av_wl + av" vers E2guardian
|
- |
|
218 |
# Redirect outbound "av_bl + av_wl +av" users HTTP requests to E2guardian
|
- |
|
219 |
# 8080 = ipset av_bl
|
- |
|
220 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport http -j REDIRECT --to-port 8080
|
- |
|
221 |
# 8090 = ipset av_wl & av
|
- |
|
222 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src ! -d $PRIVATE_IP -p tcp --dport http -j REDIRECT --to-port 8090
|
- |
|
223 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av src ! -d $PRIVATE_IP -p tcp --dport http -j REDIRECT --to-port 8090
|
- |
|
224 |
|
- |
|
225 |
# Redirection des requêtes HTTPS sortantes des usagers av_bl + av_wl + av vers E2Guardian (in a future version - don't forget to set E2guardian as a tranparent HTTPS proxy)
|
- |
|
226 |
# Redirect outbound HTTPS requests of av_bl + av_wl + av users to E2Guardian
|
- |
|
227 |
#$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_bl src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport https -j REDIRECT --to-port 8443
|
- |
|
228 |
#$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av_wl src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport https -j REDIRECT --to-port 8443
|
- |
|
229 |
#$IPTABLES -A PREROUTING -t nat -i $TUNIF -m set --match-set av src -m set ! --match-set site_direct dst ! -d $PRIVATE_IP -p tcp --dport https -j REDIRECT --to-port 8443
|
- |
|
230 |
|
229 |
# Redirection des requêtes NTP vers le serveur NTP local
|
231 |
# Redirection des requêtes NTP vers le serveur NTP local
|
230 |
# Redirect NTP request in local NTP server
|
232 |
# Redirect NTP request in local NTP server
|
231 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -s $PRIVATE_NETWORK_MASK ! -d $PRIVATE_IP -p udp --dport ntp -j REDIRECT --to-port 123
|
233 |
$IPTABLES -A PREROUTING -t nat -i $TUNIF -s $PRIVATE_NETWORK_MASK ! -d $PRIVATE_IP -p udp --dport ntp -j REDIRECT --to-port 123
|
232 |
|
234 |
|
233 |
#############################
|
235 |
#############################
|
Line 265... |
Line 267... |
265 |
|
267 |
|
266 |
# On interdit les connexions directes aux ports d'écoute d'E2Guardian. Les packets concernés ont été marqués et loggués dans la table mangle (PREROUTING)
|
268 |
# On interdit les connexions directes aux ports d'écoute d'E2Guardian. Les packets concernés ont été marqués et loggués dans la table mangle (PREROUTING)
|
267 |
# Deny direct connections on E2Guardian listen ports. The concerned paquets have been marked and logged in mangle table (PREROUTING)
|
269 |
# Deny direct connections on E2Guardian listen ports. The concerned paquets have been marked and logged in mangle table (PREROUTING)
|
268 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8080 -m mark --mark 1 -j REJECT --reject-with tcp-reset # av_bl
|
270 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8080 -m mark --mark 1 -j REJECT --reject-with tcp-reset # av_bl
|
269 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8090 -m mark --mark 2 -j REJECT --reject-with tcp-reset # av_wl + av
|
271 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8090 -m mark --mark 2 -j REJECT --reject-with tcp-reset # av_wl + av
|
270 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8443 -m mark --mark 6 -j REJECT --reject-with tcp-reset # av_bl + av_wl + av
|
272 |
#$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 8443 -m mark --mark 6 -j REJECT --reject-with tcp-reset # av_bl + av_wl + av (future version)
|
271 |
|
273 |
|
272 |
# On autorise les connexions HTTP/HTTPS légitimes vers E2Guardian
|
274 |
# On autorise les connexions HTTP/HTTPS légitimes vers E2Guardian
|
273 |
# Allow HTTP connections to E2Guardian
|
275 |
# Allow HTTP connections to E2Guardian
|
274 |
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p tcp --dport 8080 -m conntrack --ctstate NEW --syn -j ACCEPT
|
276 |
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p tcp --dport 8080 -m conntrack --ctstate NEW --syn -j ACCEPT
|
275 |
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p tcp --dport 8090 -m conntrack --ctstate NEW --syn -j ACCEPT
|
277 |
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p tcp --dport 8090 -m conntrack --ctstate NEW --syn -j ACCEPT
|
276 |
$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p tcp --dport 8443 -m conntrack --ctstate NEW --syn -j ACCEPT
|
278 |
#$IPTABLES -A INPUT -i $TUNIF -s $PRIVATE_NETWORK_MASK -p tcp --dport 8443 -m conntrack --ctstate NEW --syn -j ACCEPT # (future version)
|
277 |
|
279 |
|
278 |
# On interdit les connexions directes aux ports d'écoupe DNS (UNBOUND). Les packets concernés ont été marqués dans la table mangle (PREROUTING)
|
280 |
# On interdit les connexions directes aux ports d'écoupe DNS (UNBOUND). Les packets concernés ont été marqués dans la table mangle (PREROUTING)
|
279 |
# Deny direct connections to DNS ports (UNBOUND). The concerned paquets are marked in mangle table (PREROUTING)
|
281 |
# Deny direct connections to DNS ports (UNBOUND). The concerned paquets are marked in mangle table (PREROUTING)
|
280 |
$IPTABLES -A INPUT -i $TUNIF -p udp --dport 54 -m mark --mark 3 -j REJECT --reject-with icmp-port-unreachable
|
282 |
$IPTABLES -A INPUT -i $TUNIF -p udp --dport 54 -m mark --mark 3 -j REJECT --reject-with icmp-port-unreachable
|
281 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 54 -m mark --mark 3 -j REJECT --reject-with tcp-reset
|
283 |
$IPTABLES -A INPUT -i $TUNIF -p tcp --dport 54 -m mark --mark 3 -j REJECT --reject-with tcp-reset
|
Line 323... |
Line 325... |
323 |
. /usr/local/etc/alcasar-iptables-local.sh
|
325 |
. /usr/local/etc/alcasar-iptables-local.sh
|
324 |
fi
|
326 |
fi
|
325 |
|
327 |
|
326 |
# Journalisation et rejet des connexions (autres que celles autorisées) effectuées depuis le LAN
|
328 |
# Journalisation et rejet des connexions (autres que celles autorisées) effectuées depuis le LAN
|
327 |
# Deny and log on INPUT from the LAN
|
329 |
# Deny and log on INPUT from the LAN
|
328 |
$IPTABLES -A INPUT -i $TUNIF -m conntrack --ctstate NEW -j NFLOG --nflog-group 1 --nflog-prefix "RULE rej-int -- REJECT "
|
330 |
$IPTABLES -A INPUT -i $TUNIF -m conntrack --ctstate NEW -j NFLOG --nflog-group 3 --nflog-prefix "RULE rej-int -- REJECT "
|
329 |
$IPTABLES -A INPUT -i $TUNIF -p tcp -j REJECT --reject-with tcp-reset
|
331 |
$IPTABLES -A INPUT -i $TUNIF -p tcp -j REJECT --reject-with tcp-reset
|
330 |
$IPTABLES -A INPUT -i $TUNIF -p udp -j REJECT --reject-with icmp-port-unreachable
|
332 |
$IPTABLES -A INPUT -i $TUNIF -p udp -j REJECT --reject-with icmp-port-unreachable
|
331 |
|
333 |
|
332 |
# Interdiction d'accès à INTIF (n'est utile que lorsque chilli est arrêté).
|
334 |
# Interdiction d'accès à INTIF (n'est utile que lorsque chilli est arrêté).
|
333 |
# Reject INTIF access (only when chilli is down)
|
335 |
# Reject INTIF access (only when chilli is down)
|
334 |
$IPTABLES -A INPUT -i $INTIF -j NFLOG --nflog-group 1 --nflog-prefix "RULE Protect1 -- REJECT "
|
336 |
$IPTABLES -A INPUT -i $INTIF -j NFLOG --nflog-group 3 --nflog-prefix "RULE Protect1 -- REJECT "
|
335 |
$IPTABLES -A INPUT -i $INTIF -j REJECT
|
337 |
$IPTABLES -A INPUT -i $INTIF -j REJECT
|
336 |
|
338 |
|
337 |
# Journalisation et rejet des connexions initiées depuis le réseau extérieur (test des effets du paramètre --limit en cours)
|
339 |
# Journalisation et rejet des connexions initiées depuis le réseau extérieur (test des effets du paramètre --limit en cours)
|
338 |
# On EXTIF, the access attempts are log in channel 2 (we should test --limit option to avoid deny of service)
|
340 |
# On EXTIF, the access attempts are log in channel 2 (we should test --limit option to avoid deny of service)
|
339 |
$IPTABLES -A INPUT -i $EXTIF -m conntrack --ctstate NEW -j NFLOG --nflog-group 3 --nflog-threshold 10 --nflog-prefix "RULE rej-ext -- DROP"
|
341 |
$IPTABLES -A INPUT -i $EXTIF -m conntrack --ctstate NEW -j NFLOG --nflog-group 3 --nflog-threshold 10 --nflog-prefix "RULE rej-ext -- DROP"
|
Line 430... |
Line 432... |
430 |
$IPTABLES -A FORWARD -i $TUNIF -s $PRIVATE_NETWORK_MASK -m conntrack --ctstate NEW -j ACCEPT
|
432 |
$IPTABLES -A FORWARD -i $TUNIF -s $PRIVATE_NETWORK_MASK -m conntrack --ctstate NEW -j ACCEPT
|
431 |
|
433 |
|
432 |
#############################
|
434 |
#############################
|
433 |
# OUTPUT #
|
435 |
# OUTPUT #
|
434 |
#############################
|
436 |
#############################
|
435 |
# On laisse tout sortir à l'exception de la carte externe (cf ci-dessous)
|
437 |
# On laisse tout sortir sur la carte interne (voir les règles suivantes pour la carte externe)
|
436 |
# Everything is allowed apart from outside network interface (see bellow)
|
438 |
# We let everything out on INTIF (see following rules for the EXTIF)
|
437 |
$IPTABLES -A OUTPUT ! -o $EXTIF -j ACCEPT
|
439 |
$IPTABLES -A OUTPUT ! -o $EXTIF -j ACCEPT
|
438 |
|
440 |
|
439 |
# Si configuré, on autorise les requêtes DHCP
|
441 |
# Si configuré, on autorise les requêtes DHCP
|
440 |
# Allow DHCP requests if configured
|
442 |
# Allow DHCP requests if configured
|
441 |
public_ip_mask=`grep ^PUBLIC_IP= $CONF_FILE|cut -d"=" -f2` # ALCASAR WAN IP address
|
443 |
public_ip_mask=`grep ^PUBLIC_IP= $CONF_FILE|cut -d"=" -f2` # ALCASAR WAN IP address
|
Line 447... |
Line 449... |
447 |
|
449 |
|
448 |
# On autorise les requêtes DNS vers les serveurs DNS identifiés
|
450 |
# On autorise les requêtes DNS vers les serveurs DNS identifiés
|
449 |
# Allow DNS requests to identified DNS servers
|
451 |
# Allow DNS requests to identified DNS servers
|
450 |
$IPTABLES -A OUTPUT -o $EXTIF -d $DNSSERVERS -p udp --dport domain -m conntrack --ctstate NEW -j ACCEPT
|
452 |
$IPTABLES -A OUTPUT -o $EXTIF -d $DNSSERVERS -p udp --dport domain -m conntrack --ctstate NEW -j ACCEPT
|
451 |
|
453 |
|
452 |
# On autorise les requêtes HTTP avec log Netflow (en provenance de E2guardian)
|
454 |
# On autorise les requêtes HTTP et HTTPS avec log Netflow (en provenance de E2guardian)
|
453 |
# HTTP requests are allowed with netflow log (from E2guardian)
|
455 |
# HTTP & HTTPS requests are allowed with netflow log (from E2guardian)
|
454 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport http -j NETFLOW
|
456 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport http -j NETFLOW
|
455 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport http -j ACCEPT
|
457 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport http -j ACCEPT
|
456 |
|
- |
|
457 |
# On autorise les requêtes HTTPS sortantes
|
458 |
#$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport https -j NETFLOW # When E2guardian will be in HTTPS transparent proxy)
|
458 |
# HTTPS requests are allowed
|
- |
|
459 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport https -j ACCEPT
|
459 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport https -j ACCEPT
|
460 |
|
460 |
|
461 |
# On autorise les requêtes RSYNC sortantes (maj BL de Toulouse)
|
461 |
# On autorise les requêtes RSYNC sortantes (maj BL de Toulouse)
|
462 |
# RSYNC requests are allowed (update of Toulouse BL)
|
462 |
# RSYNC requests are allowed (update of Toulouse BL)
|
463 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport rsync -j ACCEPT
|
463 |
$IPTABLES -A OUTPUT -o $EXTIF -p tcp --dport rsync -j ACCEPT
|