j'ai passé ma journée a regarder dans les différents post de ce forum et d'autre sans trouver de réponses résolvant mon problème, explication :
je souhaite "transformer" mon ubuntu sur un réseau freebox en serveur ssh.
-j'ai installé openssh-server
-j'ai redirigé le port 22 tcp/upd de ma freebox vers le pc en question (mon.ip.reseau: 192.168.0.1) et rebooté la freebox.
-j'ai testé en local la connexion (ssh thib@192.168.0.1) avec succès
-j'ai tenté de tester en local la connexion distante (thib@mon.ip.wan)[b] ==> pas de réponse[
Y a t il quelque chose de spécial à faire pour pouvoir avoir accès à mon serveur depuis l'extérieur ?
j'ai fait
sudo iptables -L -n
[sudo] password for thib:
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
mais je n'ai aucune idée de ce que cela veut dire sinon que rien n'est ouvert...
ensuite j'ai lu pas mal sur le firewall firestarter.. je l'ai donc installé.. mais je ne sais pas vraiment coment le paramètrer...
après son installation voila ce que me donne iptables
thib@thib-ubuntu:~$ sudo iptables -L -n Chain INPUT (policy DROP) target prot opt source destination ACCEPT tcp -- 212.27.54.252 0.0.0.0/0 tcp flags:!0x17/0x02 ACCEPT udp -- 212.27.54.252 0.0.0.0/0 ACCEPT tcp -- 212.27.53.252 0.0.0.0/0 tcp flags:!0x17/0x02 ACCEPT udp -- 212.27.53.252 0.0.0.0/0 ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 limit: avg 10/sec burst 5 DROP 0 -- 0.0.0.0/0 255.255.255.255 DROP 0 -- 0.0.0.0/0 192.168.0.255 DROP 0 -- 224.0.0.0/8 0.0.0.0/0 DROP 0 -- 0.0.0.0/0 224.0.0.0/8 DROP 0 -- 255.255.255.255 0.0.0.0/0 DROP 0 -- 0.0.0.0/0 0.0.0.0 DROP 0 -- 0.0.0.0/0 0.0.0.0/0 state INVALID LSI 0 -f 0.0.0.0/0 0.0.0.0/0 limit: avg 10/min burst 5 INBOUND 0 -- 0.0.0.0/0 0.0.0.0/0 LOG_FILTER 0 -- 0.0.0.0/0 0.0.0.0/0 LOG 0 -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Unknown Input' Chain FORWARD (policy DROP) target prot opt source destination ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 limit: avg 10/sec burst 5 LOG_FILTER 0 -- 0.0.0.0/0 0.0.0.0/0 LOG 0 -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Unknown Forward' Chain OUTPUT (policy DROP) target prot opt source destination ACCEPT tcp -- 192.168.0.1 212.27.54.252 tcp dpt:53 ACCEPT udp -- 192.168.0.1 212.27.54.252 udp dpt:53 ACCEPT tcp -- 192.168.0.1 212.27.53.252 tcp dpt:53 ACCEPT udp -- 192.168.0.1 212.27.53.252 udp dpt:53 ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0 DROP 0 -- 224.0.0.0/8 0.0.0.0/0 DROP 0 -- 0.0.0.0/0 224.0.0.0/8 DROP 0 -- 255.255.255.255 0.0.0.0/0 DROP 0 -- 0.0.0.0/0 0.0.0.0 DROP 0 -- 0.0.0.0/0 0.0.0.0/0 state INVALID OUTBOUND 0 -- 0.0.0.0/0 0.0.0.0/0 LOG_FILTER 0 -- 0.0.0.0/0 0.0.0.0/0 LOG 0 -- 0.0.0.0/0 0.0.0.0/0 LOG flags 0 level 6 prefix `Unknown Output' Chain INBOUND (1 references) target prot opt source destination ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED LSI 0 -- 0.0.0.0/0 0.0.0.0/0 Chain LOG_FILTER (5 references) target prot opt source destination Chain LSI (2 references) target prot opt source destination LOG_FILTER 0 -- 0.0.0.0/0 0.0.0.0/0 LOG tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound ' DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x02 LOG tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound ' DROP tcp -- 0.0.0.0/0 0.0.0.0/0 tcp flags:0x17/0x04 LOG icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 8 limit: avg 1/sec burst 5 LOG flags 0 level 6 prefix `Inbound ' DROP icmp -- 0.0.0.0/0 0.0.0.0/0 icmp type 8 LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 5/sec burst 5 LOG flags 0 level 6 prefix `Inbound ' DROP 0 -- 0.0.0.0/0 0.0.0.0/0 Chain LSO (0 references) target prot opt source destination LOG_FILTER 0 -- 0.0.0.0/0 0.0.0.0/0 LOG 0 -- 0.0.0.0/0 0.0.0.0/0 limit: avg 5/sec burst 5 LOG flags 0 level 6 prefix `Outbound ' REJECT 0 -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable Chain OUTBOUND (1 references) target prot opt source destination ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED ACCEPT 0 -- 0.0.0.0/0 0.0.0.0/0
enfin j'ai vu également des nmaps.. je l'ai donc installé et testé..
thib@thib-ubuntu:~$ nmap mon.ip.wan -p 22
Starting Nmap 4.20 ( http://insecure.org ) at 2008-03-22 21:34 CET
Note: Host seems down. If it is really up, but blocking our ping probes, try -P0
Nmap finished: 1 IP address (0 hosts up) scanned in 4.025 seconds
j'ai donc fait ce qu'ils m'ont conseillés.. et voila :
thib@thib-ubuntu:~$ nmap mon.ip.wan -P0
Starting Nmap 4.20 ( http://insecure.org ) at 2008-03-22 21:35 CET
Stats: 0:01:18 elapsed; 0 hosts completed (1 up), 1 undergoing Connect() Scan
Connect() Scan Timing: About 22.69% done; ETC: 21:41 (0:04:25 remaining)
Stats: 0:05:36 elapsed; 0 hosts completed (1 up), 1 undergoing Connect() Scan
Connect() Scan Timing: About 98.70% done; ETC: 21:40 (0:00:04 remaining)
All 1697 scanned ports on lns-bzn-49f-mon-ip-wan.adsl.proxad.net (mon.ip.wan) are filtered
Nmap finished: 1 IP address (1 host up) scanned in 351.309 seconds
je trouve bizarre cette ligne :"All 1697 scanned ports on lns-bzn-49f-mon-ip-wan.adsl.proxad.net (mon.ip.wan) are filtered" adsl.proxad.net est un newsgroup de free auquel j'ai participé... mais qu'est ce que ça vient faire là ?? le "1 host up" c'est bien mon server SSH ??
une idée ??
merci beaucoup
