Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am a newbie to networking, so need some help to understand if what I am doing is right:

I have a VM which hosts a Ubuntu guest OS with an internal IP: 192.168.15.6 I have setup an ssh server on port 8002 (in case the ISP blocks 22). I also have a web server (Apache 2) setup on port 8012 (in case the ISP blocks 80).

My external IP is: xx.yy.aa.bb. I have configured my router to port forward port 8002, and now I am able to acces my web server from an external box. But going by the same pattern, I port forwarded my ssh port as:

source ip: xx.yy.aa.bb
source netmask: 255.255.255.0

destination ip: 192.168.15.6
destination netmask: 255.255.255.255 (I cannot change this)

destination port start: 8002
destination port end: 8002
destination port map: 8002

Why am I not able to telnet into my machine?

share|improve this question
2  
telnet and ssh are not the same thing. If you are not listening for telnet (ie a telnet server and have telnet forwarded as well, telnet will hit the firewall and be blocked). Can you ssh in with putty or another ssh program? –  MaQleod Aug 21 '13 at 18:13
    
Does SSH work when you try to SSH to 192.168.15.6:8002 from another computer on the internal LAN? Instead of externally? –  j_bombay Aug 21 '13 at 21:12
1  
If you can't SSH from inside your LAN between two machines you need to fix that first before you try port forwarding it. –  Scott Chamberlain Aug 21 '13 at 21:54
    
No ssh does not work externally either, it works internally only... pardon my ignorance, but do i need to setup a telnet server separately and port forward it as well to expose the ssh server as well? –  Neel Aug 21 '13 at 21:58
    
If SSH works internally, but not externally, then the traffic is being blocked somewhere on the external connection (probably the firewall). By default, most applications use 22 with SSH, so be sure you are specifying 8002 (which you probably are if you can connect internally, but just want to make sure). If you can connect to the HTTP server internally and externally, then it isn't a NAT traversal/reflection issue. Can you post the config for the forwarder that works (the http server)? And no, you don't need a telnet server unless you need it too (which I do not recommended - not secure). –  MaQleod Aug 22 '13 at 15:40

1 Answer 1

Its difficult to understand the question and config properly, but why have you specified a source IP and netmask - it would seem to me this should not be specified, or be 0.0.0.0 in each case.

My guess is that it is only forwarding requests coming from xx.yy.aa.X (where X is 1-254), when what you want is to forward anything it sees.

share|improve this answer
    
I tried that option too - same result.. –  Neel Aug 21 '13 at 21:59

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.