galmiche
28-09-2005, 12:15
Bonjour à tous,
J'ai suivi le tutorial de macsat en :
- installant ipkg
-crée mon disque /opt
-installé le serveur SSH et mon dropbear fonctionne
Or, si tout va bien depuis le LAN (SSH accés OK), je ne peux pas me connecter depuis le monde extérieur WAN !!!
Pourtant j'ai bien crée le post-firewall donné par macsat.
J'ai aussi qqes forward dans le menu graphique de OLEG mais rien en port 22 et 23 crée par le menu graphique. Le port SSH est supposé etre défini ds le post-firewall donné à la fin de ce message.
Ques se passe il? Qq'un as t'il de l'aide à me fournir svp?
Merci
Hervé
Voici le fichier post-firewall & la table que j'obtient au reboot:
login as: admin
admin@192.168.0.1's password:
[admin@Wl500gx root]$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABL ISHED
ACCEPT all -- anywhere anywhere state NEW
ACCEPT all -- anywhere anywhere state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT icmp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABL ISHED
ACCEPT tcp -- anywhere anywhere tcp flags:SYN,RST,AC K/SYN limit: avg 1/sec burst 5
ACCEPT tcp -- anywhere anywhere tcp flags:FIN,SYN,RS T,ACK/RST limit: avg 1/sec burst 5
ACCEPT icmp -- anywhere anywhere limit: avg 1/sec bur st 5 icmp echo-request
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:2165
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:2905
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:2905
ACCEPT tcp -- anywhere 192.168.0.20 tcp dpt:5800
ACCEPT udp -- anywhere 192.168.0.20 udp dpt:5800
ACCEPT tcp -- anywhere 192.168.0.20 tcp dpt:5900
ACCEPT udp -- anywhere 192.168.0.20 udp dpt:5900
ACCEPT tcp -- anywhere 192.168.0.20 tcp dpt:3210
ACCEPT udp -- anywhere 192.168.0.20 udp dpt:3210
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:webcache
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:webcache
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:4662
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:4672
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:6881
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:6881
ACCEPT all -- anywhere 192.168.0.150
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain MACS (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain logaccept (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `ACCEPT '
ACCEPT all -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `DROP'
DROP all -- anywhere anywhere
[admin@Wl500gx root]$ cat /usr/local/sbin/post-firewall
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -t nat -A PREROUTING -i -p tcp --dport 22 -j DNAT --to-destination :22
iptables -A INPUT -j DROP
[admin@Wl500gx root]$
J'ai suivi le tutorial de macsat en :
- installant ipkg
-crée mon disque /opt
-installé le serveur SSH et mon dropbear fonctionne
Or, si tout va bien depuis le LAN (SSH accés OK), je ne peux pas me connecter depuis le monde extérieur WAN !!!
Pourtant j'ai bien crée le post-firewall donné par macsat.
J'ai aussi qqes forward dans le menu graphique de OLEG mais rien en port 22 et 23 crée par le menu graphique. Le port SSH est supposé etre défini ds le post-firewall donné à la fin de ce message.
Ques se passe il? Qq'un as t'il de l'aide à me fournir svp?
Merci
Hervé
Voici le fichier post-firewall & la table que j'obtient au reboot:
login as: admin
admin@192.168.0.1's password:
[admin@Wl500gx root]$ iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABL ISHED
ACCEPT all -- anywhere anywhere state NEW
ACCEPT all -- anywhere anywhere state NEW
ACCEPT tcp -- anywhere anywhere tcp dpt:www
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp
ACCEPT icmp -- anywhere anywhere
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh
DROP all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABL ISHED
ACCEPT tcp -- anywhere anywhere tcp flags:SYN,RST,AC K/SYN limit: avg 1/sec burst 5
ACCEPT tcp -- anywhere anywhere tcp flags:FIN,SYN,RS T,ACK/RST limit: avg 1/sec burst 5
ACCEPT icmp -- anywhere anywhere limit: avg 1/sec bur st 5 icmp echo-request
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:2165
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:2905
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:2905
ACCEPT tcp -- anywhere 192.168.0.20 tcp dpt:5800
ACCEPT udp -- anywhere 192.168.0.20 udp dpt:5800
ACCEPT tcp -- anywhere 192.168.0.20 tcp dpt:5900
ACCEPT udp -- anywhere 192.168.0.20 udp dpt:5900
ACCEPT tcp -- anywhere 192.168.0.20 tcp dpt:3210
ACCEPT udp -- anywhere 192.168.0.20 udp dpt:3210
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:webcache
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:webcache
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:4662
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:4672
ACCEPT tcp -- anywhere 192.168.0.10 tcp dpt:6881
ACCEPT udp -- anywhere 192.168.0.10 udp dpt:6881
ACCEPT all -- anywhere 192.168.0.150
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain MACS (0 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP all -- anywhere anywhere state INVALID
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
Chain logaccept (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `ACCEPT '
ACCEPT all -- anywhere anywhere
Chain logdrop (0 references)
target prot opt source destination
LOG all -- anywhere anywhere state NEW LOG level warning tcp-sequence tcp-options ip-options prefix `DROP'
DROP all -- anywhere anywhere
[admin@Wl500gx root]$ cat /usr/local/sbin/post-firewall
#!/bin/sh
iptables -D INPUT -j DROP
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
iptables -t nat -A PREROUTING -i -p tcp --dport 22 -j DNAT --to-destination :22
iptables -A INPUT -j DROP
[admin@Wl500gx root]$