LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 06-10-2013, 10:53 PM   #1
donando
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Rep: Reputation: Disabled
Access a Linux server through dynamic dns


I spent way too many hours on this and still can't get it to work, hope someone can help.

I have an old RH Linux install, I think RH Linux 6.2 very basic install, no gui, just command line and X11. I can do everything I want on local lan, telnet, ftp, X11 all using root. But I cannot access any services from outside using my router's port forwarding.

I tried port forwarding ftp (21), telnet(23) and vncserver(5901) to the correct local IP address but I always get "Connection Refused" or "target machine actively refused it". I know I'm getting to the server, but something is blocking root access.

I turned off IPTABLES, and I really don't want to get into SSH right now (I know all about security issues, this is just a test server, nothing important on here, so hackers you can go for it!)...just please let me know what I have to do to get root access to my own machine...please.

I checked all the obvious stuff, like ftpaccess, securetty, etc...like I said, everything works the way I want on a local lan, just coming in from outside is where the problem is.

I just don't get it, with no firewall, what could be blocking it.

I'm not really a newbie...just a little rusty.

Thanks for any help.
 
Old 06-11-2013, 02:20 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'll refrain from moaning about not using ssh (but.... WHY??? it's already there isn't it??), but do avoid ftp for now certainly. it's a clunky and confusing protocol from the archaic dual channel method it uses. That said though, if the box is listening, and ipchains (this is the 13 year old RH6.2 right????) is allowing in requests from remote locations, then it should work. dynamic DNS is certainly irrelevant as long as it's resolving to the right IP - check that that is correct.

so "ipchains -vnL" should work, or "iptables -vnL" if it did use iptables. That's my best guess though, only allowing local subnet access in netfilter.
 
Old 06-11-2013, 09:18 AM   #3
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Four options

1) Your DDNS is not resolving the correct IP. Forget DDNS for now and just use your router's public IP.
2) Your ISP is blocking incoming connections on those ports. Try setting up one of your services to listen on a non-standard port and see if it is still blocked
3) Your router is blocking the connections - check the firewall settings
4) Your machine is blocking the connections - check the ipchains settings as described by acid_kewpie

Last edited by suicidaleggroll; 06-11-2013 at 09:19 AM.
 
Old 06-11-2013, 11:32 AM   #4
donando
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
thanks suicidaleggroll (wow! now that's a username!) and acid_kewpie, (gee, I wish I had been more creative with my username)....

Just to respond to the 4 options:

1. DDNS is working properly because I can get to other services on other machines, for example, RDP (port 3389) to a Windows machine, mySQL (port 3306) to another Windows machine, FTP (port 21) to a Windows machine (before I switched over to the Linux box), etc.

2. ISP is not blocking, because everything works on same ports on Windows machines.

3. (see 1. and 2.)

4. yes, I think this is correct, my Linux machine is blocking, but why ? iptables -nvL shows no rules and ipchains -nvL says "Incompatible with this kernel"

There must be some setting somewhere that is blocking root access to this machine if the connection is coming from anything other than local subnet....but where is this setting? Is there anything other than iptables that could be blocking? maybe some kind of network settings, but I don't see it.

thanks.
 
Old 06-11-2013, 12:28 PM   #5
donando
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
I found something in sysctl.conf that might be a clue?

# Controls IP packet forwarding
net.ipv4.ip_forward = 1

# Controls source route verification
net.ipv4.conf.default.rp_filter = 1


I'm familiar IP packet forwarding, I have two NICs in this machine, so packets can be forwarded based on second NIC IP address and static routes, but what does the second setting mean?

Thanks.
 
Old 06-11-2013, 05:28 PM   #6
donando
LQ Newbie
 
Registered: Jun 2013
Posts: 4

Original Poster
Rep: Reputation: Disabled
AHHHHH....I figured it out! After tons of searches, reading, learning,...it was my DDNS...I havd both a ?????.com and ?????.org defined in my DDNS host and I was using the wrong one for the linux server, ....wow...several days to find a typo problem, who hasn't been there?

By the way, suicidaleggroll, your no. 1 suggestion did it for me, "Forget DDNS for now and just use your router's public IP". When I tried that, everything worked....I thought to my self, wtf!!!

Oh well, I certainly know a lot more about linux now than I ever did. Thanks for the support and motivation to keep searching.

Cheers!

Last edited by donando; 06-11-2013 at 05:34 PM.
 
  


Reply


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
Linux web server with Dynamic DNS charlesmf Linux - Server 1 09-17-2007 04:47 PM
Dynamic DNS Server Linux? Hewson Linux - Server 4 07-14-2007 02:40 PM
I want to be a dynamic dns server. jmanjohn61 Linux - Software 0 01-19-2004 08:40 AM

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

All times are GMT -5. The time now is 01:27 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