Hallo,
Ik wil graag vanaf een computer op m'n universiteit kunnen SSH-en naar mijn Linux computer thuis. Ik heb ADSL, een E-Tech router en een computer met RedHat 8.0.
Als ik nou op de linuxcomputer dit doe: ssh 192.168.0.2 (is de linuxcomputer zelf) kan ik inloggen. SSH doet het dus wel. Maar als ik nou dit doe: ssh 62.166.xxx.xx (=mijn vaste internet-ip) krijg ik:
ssh: connect to address 62.166.xxx.xx port 22: Connection refused
Mijn router heb ik nog maar pas, dus misschien licht het daar wel aan. Ik heb bij "Virtual Server Configuration" wel dit ingevuld (zou toch genoeg moeten zijn?):
ID Public Port Private Port Port Type Host IP Address
1 22 22 TCP 192.168.0.2
2 22 22 UDP 192.168.0.2
Of moet ik in Linux nog iets veranderen? (ik had mijn ip-adres (62.166.xxx.xx) al eens toegevoegd aan hosts.allow, maar dat hielp niets).
Nog even de output van iptables -V (lijkt mij wel ok, maar ik heb nog niet veel kaas gegeten van iptables):
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- 192.168.0.1 anywhere udp spt:domain
REJECT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- 192.168.0.1 anywhere udp spt:domain
REJECT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable
Ik wil graag vanaf een computer op m'n universiteit kunnen SSH-en naar mijn Linux computer thuis. Ik heb ADSL, een E-Tech router en een computer met RedHat 8.0.
Als ik nou op de linuxcomputer dit doe: ssh 192.168.0.2 (is de linuxcomputer zelf) kan ik inloggen. SSH doet het dus wel. Maar als ik nou dit doe: ssh 62.166.xxx.xx (=mijn vaste internet-ip) krijg ik:
ssh: connect to address 62.166.xxx.xx port 22: Connection refused
Mijn router heb ik nog maar pas, dus misschien licht het daar wel aan. Ik heb bij "Virtual Server Configuration" wel dit ingevuld (zou toch genoeg moeten zijn?):
ID Public Port Private Port Port Type Host IP Address
1 22 22 TCP 192.168.0.2
2 22 22 UDP 192.168.0.2
Of moet ik in Linux nog iets veranderen? (ik had mijn ip-adres (62.166.xxx.xx) al eens toegevoegd aan hosts.allow, maar dat hielp niets).
Nog even de output van iptables -V (lijkt mij wel ok, maar ik heb nog niet veel kaas gegeten van iptables):
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- 192.168.0.1 anywhere udp spt:domain
REJECT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SYN,RST,ACK/SYN
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
ACCEPT udp -- 192.168.0.1 anywhere udp spt:domain
REJECT tcp -- anywhere anywhere tcp flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp reject-with icmp-port-unreachable