LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-12-2015, 05:36 PM   #1
fredsea
LQ Newbie
 
Registered: Jul 2010
Location: Washington State, USA
Distribution: Ubuntu
Posts: 23

Rep: Reputation: 0
Port forwarding (POP3 and SSH) messing up with WiFi connecting to the services


I have a local LAN set up with the router (a fancy Linksys) providing DHCP and a file and mail server doing DNS via dnsmasq. I have a dynamic IP provider, so I can, in principle, access the server from outside my LAN with the same name (which is set in its /etc/hosts file). To make this work, I need to set up port forwarding for POP3 and SSH, and it all worked fine with my previous, low-end, D-Link router.

I changed router, since WiFi coverage was really lousy, but now, when I set up port forwarding, accessing the server via WiFi for POP3 or SSH does not work any more, because the request is seen as coming from the router (which has no keys to exchange with the server) instead of the computer actually trying to connect. This seems also to be the case when access is requested from outside the LAN, basically making port forwarding completely useless.

I can't find anything in the Linksys interface that even remotely addresses such a problem, and, while I will try, I have no hope that their tech support will have a solution. Does anyone have a suggestion (besides going back to the old router, which I will any time I will be out of town, if everything else fails, but, gee...)

Thank you!
 
Old 09-13-2015, 10:18 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,822

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
Can you access your server via ssh using its LAN IP address?
Are the LAN and wireless settings identical between the old and new routers?
How iare the network settings configured on the server?
 
Old 09-13-2015, 01:56 PM   #3
fredsea
LQ Newbie
 
Registered: Jul 2010
Location: Washington State, USA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
Thanks. I cannot reach the server whether using its IP or its URL: from what I saw in the logs, once port forwarding is set up (for example port 22), the server believes it got a request from the router and not from the actual computer - but only if the connection is made through WiFi (wired connections have no problem), or from outside the LAN, still through WiFi (but the router shouldn't be able to tell in this last case). The only difference I can think of between the old and new router seems to be that the old one was set up with 192.168.0.x, and the new one as 192.168.1.x. I can move it to 0.x, but I doubt that has anything to do with anything.

The router is in charge of DHCP, but the server has a reserved assignment. The server uses dnsmasq to handle DNS. The idea is that in this way when my laptops try to reach it from within the LAN, the server checks its /etc/hosts file, where the URL is assigned to its fixed local IP. When I try to reach it from outside, No-IP translates the URL to my external IP and port forwarding should finish the job. The server uses Google's DNS servers to route requests from inside the LAN. It has always worked seamlessly until now - it even worked with this router for a while. I didn't notice any event that I could think caused this problem, but who knows.
 
Old 09-13-2015, 04:49 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,822

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
Please post the model numbers of the old and new router.

I assume that you have not configured any sort of DMZ or guest network etc. in the router? Ignoring DMZs or guest networks I would expect with a typical home router that any device on the LAN should be able to connect to any other device regardless of whether it connected wired or wireless. I assume that wireless devices can connect to the internet.

I would check the wireless configuration settings in the router.
 
Old 09-15-2015, 03:52 PM   #5
fredsea
LQ Newbie
 
Registered: Jul 2010
Location: Washington State, USA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
Thank you for your comments. I did not set up a DMZ, but I did open guest accounts (the router is a Linksys EA8500, with both 2.5 and 5 MHZ bands). However, turning the guest accounts off did not change anything: ssh over WiFi is still inaccessible if port forwarding is in place, but is fine if it is not

By the way, the D-Link router is a DIR-601 (2.5 MHz only). I used a few range extenders with it. I haven't tried to put it back in service yet, but over several years it never caused any such problem.
 
Old 09-15-2015, 04:12 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,822

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
Not sure it will help but do you have the latest firmware installed?
Quote:
Firmware

Ver.1.1.4 (Build 168206)
Latest Date: 08/12/2015
http://www.linksys.com/us/support-ar...icleNum=156300
 
Old 09-15-2015, 06:08 PM   #7
fredsea
LQ Newbie
 
Registered: Jul 2010
Location: Washington State, USA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
ssh, POP failing when port forwarding is active

Thanks, but, yes, the firmware has the number you quote. For what it's worth I attached a snapshot of the firewall rules on the router, which I haven't touched.
Attached Thumbnails
Click image for larger version

Name:	Selection_481.png
Views:	10
Size:	24.2 KB
ID:	19595  
 
Old 09-15-2015, 06:34 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,822

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
I did glance at the manual but that didn't offer much help. Have you tried plugging your laptop into the router to see if you can access the server wired. Try with the server's LAN IP address and if that works use your WAN address.
 
Old 09-15-2015, 09:18 PM   #9
fredsea
LQ Newbie
 
Registered: Jul 2010
Location: Washington State, USA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
Thank you again! Yes, wired connections have no problem, whether port forwarding is on or not. Can't figure out how that could be the case, but that's what happens. And, quite surprisingly to me, even if I ssh'd with the LAN IP, the log file shows that it was received as a request from the router when port forwarding was on (as already noted, it works fine if the request is over a wired connection, or if port forwarding is off).
 
Old 09-15-2015, 09:47 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,822

Rep: Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960Reputation: 5960
It looks like a wireless problem with your router. What, I have no idea.
 
Old 09-16-2015, 01:05 PM   #11
fredsea
LQ Newbie
 
Registered: Jul 2010
Location: Washington State, USA
Distribution: Ubuntu
Posts: 23

Original Poster
Rep: Reputation: 0
Well, I have to apologize for raising this problem, when it turns out that it was due to a very dumb mistake on my part (mainly because I clearly have very fuzzy comprehension of how DNS works). I had, foolishly, added external DNS resolvers on my router (besides the local mail/ssh/DNS server), and forgotten about them. Deleting them seems to have solved the problem. Apparently, the extra resolvers took over and presented the access request as coming from my router. I don't know why this should happen, of course. Thank you for your patience.
 
  


Reply

Tags
port forwarding, router, wifiwireless


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Allowing certain ports and port forwarding without messing up current config media-c Linux - Newbie 2 01-19-2009 01:14 PM
Reverse,Port Forwarding via SSH and connecting from two different location metallica1973 Linux - Networking 2 12-20-2008 04:42 PM
SSH port forwarding to secure other services sunlinux Linux - Security 1 02-15-2008 12:32 AM
port forwarding for pop3 and smtp sundar1712 Linux - Networking 2 05-16-2006 07:44 PM
Terminal Services Port Forwarding rich2oo1 Linux - Networking 6 06-01-2003 09:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration