ça marche pas
schéma de mon réseau domestique
[ LAN ] [ Sonata ]
[ 10.0.1.0/24 ]------eth0(10.0.1.1)[Serveur Quid]ppp0(IP_dynamique)------Internet
[ ] [Linux Debian]
|
|
eth1(10.0.0.1)------Modem_ADSL(10.0.0.138) |
dans mon /etc/squid.conf, on trouve (entre autres, je peux mettre la copie intégrale si c'est utile):
Citation :
#Recommended minimum configuration:
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 901 # SWAT
acl purge method PURGE
acl CONNECT method CONNECT
acl lan src 10.0.0.0/255.0.0.0
# Only allow cachemgr access from localhost
http_access allow manager localhost
http_access deny manager
# Only allow purge requests from localhost
http_access allow purge localhost
http_access deny purge
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
#
# INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
#
http_access allow lan
http_access allow localhost
# And finally deny all other access to this proxy
http_access deny all
|
le reste en gros est par défaut
dans mon script firewall (MonMotha):
TCP_ALLOW="21 20 22 3128 4662 5000"
|
quand il s'exécute:
Hostwise TCP Allows: 0/0>21 0/0>20 0/0>22 0/0>3128 0/0>4662 0/0>5000 |
et pour bien vérifier:
Sonata:/etc/init.d# iptables -L
Chain INPUT (policy DROP)
target prot opt source destination
INETIN all -- anywhere anywhere
ACCEPT all -- 10.0.1.0/24 anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- anywhere anywhere udp dpt:bootps
Chain FORWARD (policy DROP)
target prot opt source destination
INETIN all -- anywhere anywhere
INETOUT all -- anywhere anywhere
ACCEPT all -- 10.0.1.0/24 anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
INETOUT all -- anywhere anywhere
Chain DMZIN (0 references)
target prot opt source destination
Chain DMZOUT (0 references)
target prot opt source destination
Chain INETIN (2 references)
target prot opt source destination
TREJECT all -- anywhere anywhere state INVALID
TREJECT icmp -- anywhere anywhere icmp redirect
TREJECT icmp -- anywhere anywhere icmp router-advertisement
TREJECT icmp -- anywhere anywhere icmp router-solicitation
TREJECT icmp -- anywhere anywhere icmp type 15
TREJECT icmp -- anywhere anywhere icmp type 16
TREJECT icmp -- anywhere anywhere icmp address-mask-request
TREJECT icmp -- anywhere anywhere icmp address-mask-reply
ACCEPT icmp -- anywhere anywhere icmp echo-request limit: avg 1/sec burst 5
TREJECT icmp -- anywhere anywhere icmp echo-request
ACCEPT icmp -- anywhere anywhere icmp !echo-request
TCPACCEPT tcp -- anywhere anywhere tcp dpt:ftp
TCPACCEPT tcp -- anywhere anywhere tcp dpt:ftp-data
TCPACCEPT tcp -- anywhere anywhere tcp dpt:ssh
TCPACCEPT tcp -- anywhere anywhere tcp dpt:3128
TCPACCEPT tcp -- anywhere anywhere tcp dpt:4662
TCPACCEPT tcp -- anywhere anywhere tcp dpt:5000
UDPACCEPT udp -- anywhere anywhere udp dpt:bootpc
UDPACCEPT udp -- anywhere anywhere udp dpt:6112
UDPACCEPT udp -- anywhere anywhere udp dpt:6119
UDPACCEPT udp -- anywhere anywhere udp dpt:4000
ACCEPT all -- anywhere anywhere state ESTABLISHED
TCPACCEPT tcp -- anywhere anywhere tcp dpts:1024:65535 state RELATED
UDPACCEPT udp -- anywhere anywhere udp dpts:1024:65535 state RELATED
TREJECT all -- anywhere anywhere
Chain INETOUT (2 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
Chain LDROP (0 references)
target prot opt source destination
LOG tcp -- anywhere anywhere limit: avg 2/sec burst 5 LOG level info prefix `TCP Dropped '
LOG udp -- anywhere anywhere limit: avg 2/sec burst 5 LOG level info prefix `UDP Dropped '
LOG icmp -- anywhere anywhere limit: avg 2/sec burst 5 LOG level info prefix `ICMP Dropped '
LOG all -f anywhere anywhere limit: avg 2/sec burst 5 LOG level warning prefix `FRAGMENT Dropped '
DROP all -- anywhere anywhere
Chain LREJECTLTREJECT (0 references)
target prot opt source destination
Chain TCPACCEPT (7 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN limit: avg 20/sec burst 5
LOG tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN limit: avg 2/sec burst 5 LOG level warning prefix `Possible SynFlood '
TREJECT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp flags:!SYN,RST,ACK/SYN
LOG all -- anywhere anywhere limit: avg 2/sec burst 5 LOG level warning prefix `Mismatch in TCPACCEPT '
TREJECT all -- anywhere anywhere
Chain TREJECT (13 references)
target prot opt source destination
REJECT tcp -- anywhere anywhere reject-with tcp-reset
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable
DROP icmp -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain UDPACCEPT (5 references)
target prot opt source destination
ACCEPT udp -- anywhere anywhere
LOG all -- anywhere anywhere limit: avg 2/sec burst 5 LOG level warning prefix `Mismatch on UDPACCEPT '
TREJECT all -- anywhere anywhere
Chain ULDROP (0 references)
target prot opt source destination
ULOG tcp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LDROP_TCP' queue_threshold 1
ULOG udp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LDROP_UDP' queue_threshold 1
ULOG icmp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LDROP_ICMP' queue_threshold 1
ULOG all -f anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LDROP_FRAG' queue_threshold 1
DROP all -- anywhere anywhere
Chain ULREJECT (0 references)
target prot opt source destination
ULOG tcp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LREJECT_TCP' queue_threshold 1
ULOG udp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LREJECT_UDP' queue_threshold 1
ULOG icmp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LREJECT_UDP' queue_threshold 1
ULOG all -f anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LREJECT_FRAG' queue_threshold 1
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain ULTREJECT (0 references)
target prot opt source destination
ULOG tcp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LTREJECT_TCP' queue_threshold 1
ULOG udp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LTREJECT_UDP' queue_threshold 1
ULOG icmp -- anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LTREJECT_ICMP' queue_threshold 1
ULOG all -f anywhere anywhere limit: avg 2/sec burst 5 ULOG copy_range 0 nlgroup 1 prefix `LTREJECT_FRAG' queue_threshold 1
REJECT tcp -- anywhere anywhere reject-with tcp-reset
REJECT udp -- anywhere anywhere reject-with icmp-port-unreachable
DROP icmp -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Sonata:/etc/init.d# |
on a bien
TCPACCEPT tcp -- anywhere anywhere tcp dpt:3128 |
(oui, je sais que du point de vue sécurité c'est atroce mais c'est juste pour tester
dans mon mozilla sur le client:
bilan:
ou j'ai merdé ?
tout m'a l'air correct pourtant mais il se peut que j'ai fait une bourde, juste que je vois pas
---------------
« Le verbe "aimer" est le plus compliqué de la langue. Son passé n'est jamais simple, son présent n'est qu'imparfait et son futur toujours conditionnel. » Jean Cocteau