LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem telnet to WAN IP address from LAN side (https://www.linuxquestions.org/questions/linux-newbie-8/problem-telnet-to-wan-ip-address-from-lan-side-706602/)

rich1976 02-22-2009 08:44 AM

problem telnet to WAN IP address from LAN side
 
Hello,

I built my first Linux server yesterday. My network consists of 1 Linux server and several Windows PC behind ADSl router/modem with ISP providing a static IP address. I have setup postfix and POP3 accounts. I can send email (relay via my ISP SMTP server) but have some problems receiving when i'm on my home network (i can receive emails fine when connected to 'other networks' eg my neighbours unprotected wifi ;-))

Whenever i'm on my home network i receive error 'could not open connection to host'

Since then i have noticed from my linux machine (Ubuntu 8.10) i can
$ netcat localhost 25

WORKS

$ netcat <my_WAN_IP_Address> 25

DOES NOT WORK

i can telnet from my windows laptop when connected to my neighbours wifi:

>telnet (my_WAN_IP_Address> 25

WORKS OK

Any ideas? I have port forwarding configured in my router to direct all incoming WAN traffic on port 25, 110 to my Linux IP Address on LAN side. But if i try to access the Linux server via my static WAN IP FROM LAN side it never works.

Pleaes help!

Thanks,
Rich

acid_kewpie 02-22-2009 08:51 AM

I don't quite understand the description of the scenario you gave, but the examples with telnet are the correct behaviour. You would normally only be able to hit services on the wan IP from outside of your network. in your example you connect to wan:25 from the client. This is then forwarded into your server. the server then sees a packet addressed to it from the client, and so replies *directly* to the client to establish a connection. however your client is expecting to talk to the wan ip, not the server ip, so disregards the response. Compare this to you wardriving and hitting wan:25 then that also hits the server, but the response is sent back to the internet ip address of your neighbors router, so goes back through your router, which then translates the ip back to the wan address and you then continue to establish a connection.

rich1976 02-22-2009 09:05 AM

Thanks for the reply, maybe if i describe what i need to do you can help me !

I have created email accounts within postfix running on my Ubuntu server which i want to access from my windows laptop with outlook express.

So i configure outlook express to receive emails through pop3.
ie outlook POP3 server address is: mydomainname.co.uk
mydomainname.co.uk points to my static IP address given by my ISP.

Problem is outlook express cant open port 110 to mydomainname.co.uk from my LAN. It DOES work when i'm not conneced to my home network eg neighbours wifi.

I have same issue with telnet also as i tried to describe previously.

Hopefully this explanation is clearer.

Thanks !
Rich

rich1976 02-22-2009 09:12 AM

update:

if i change the pop3 server address in Outlook Express from:

mydomainname.co.uk

to

linux-server-hostname

It works OK.

However, now i can only download emails when i'm on my home LAN. Obviously if im on a different network the linux-server-hostname can not be found.

Is there a single configuration that can work whether im on my home network or another network?


All times are GMT -5. The time now is 03:35 PM.