PortForward's Home
PFConfig Support
Router Index
Port List


Advanced search

PortForward's Forum

If you ask a question, please answer a question. Help someone out by sharing your knowledge.

Skip to content


  • Board index ‹ Concepts
  • Change font size
  • Print view

port forwarding -- static ip and ddns

How/Why does this work?
Topic locked
10 posts • Page 1 of 1

port forwarding -- static ip and ddns

Postby old_forum_roidemai » Tue Jul 22, 2008 6:15 pm

I feel I'm missing a piece of the equation.
I'm looking at the Port Forwarding instructions for my router (linksys WRT54GS), and the first line I read is:
"To setup port forwarding on this router your computer needs to have a static ip address."

Your ISP needs to provide you with a static IP to do that though, no? It seems not if you can just pick one for your computer. Or this is just the internal IP address? I thought the inability to do this was the logic behind DDNS with an update client--to provide a workaround for not having a static IP?


old_forum_roidemai
 
Posts: 6
Joined: Thu Jan 01, 1970 12:00 am
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_tedtrp » Tue Jul 22, 2008 7:37 pm

#1 This is what you need to do, if you have not already.

a) Check the IP address and default gateway on your computer

On most versions of Windows: Go to Start -> run. Type in cmd and press the ok button. In the new window type in ipconfig /all and press enter.

-

On the Mac, following the steps athttp://www.portforward.com/networking/static-Mac10.4.htm

But don't: Click the Configure IPv4 drop down box and select the Manually option.

-

Other OS other than Windows and Mac, how-ever you check the IP and default gateway.

If you need help doing that, please post the name and version of the OS.

-

#2 With your web browser go to the default gateway. Please make sure that you are in the router that you expected to get into.

(Or that the default gateway on your computer does match the IP address of the router).

If you did not get into the router that you expected to (or the default gateway does not match the router's LAN IP), you might have something called Double NAT.

#3 Check the WAN IP in the router, to also check for Double NAT.

In your router, go to Status or Status -> Router.

In here should be the following: IP address, Subnet Mask, Default Gateway, and at least one DNS.

For the IP adddress, make sure it is not any of these:

a) 10.0.0.0 to 10.255.255.255

b) 172.16.0.0 to 172.31.255.255

c) 192.168.0.0 to 192.168.255.255

#4 If not Double NATTED, Good. :)

Now we need to check the DHCP range of the router

This may be in: Setup -> Basic Setup, where there is something about a starting IP and the number of users.

Status -> Local Network, where there is something about a starting IP and the ending IP.

Please make sure that when setting your IP, you set it outside of that range.
old_forum_tedtrp
 
Posts: 17836
Joined: Sat Apr 28, 2007 9:26 pm
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_roidemai » Tue Jul 22, 2008 11:55 pm

Thank you for the reply.
I'm on openSuSE 11.0, x86-64

#1,2 ok

#3 To clarify, the following is the procedure to check the WAN IP in the router? or is that a procedure in it of itself, and the rest is a subsequent set of procedures?:

In your router, go to Status or Status -> Router.
In here should be the following: IP address, Subnet Mask, Default Gateway, and at least one DNS.
For the IP address, make sure it is not any of these:
a) 10.0.0.0 to 10.255.255.255
b) 172.16.0.0 to 172.31.255.255
c) 192.168.0.0 to 192.168.255.255


The WAN IP is outside this range, the local IP is not.

#4 The default IP for the router is 192.168.1.1, this is standard it appears. Starting IP and ending IP is also default, and outside of this range. There doesn't appear to be anything to adjust. But I'm not sure where that leaves me.

I'm still confused conceptually about a few things. When "IP address" is mentioned is it assumed to be WAN IP or the local IP address, or both(i.e. depending on context)? And is it just the local IP we are setting when it's said static IP? Otherwise, isn't it your ISP that needs to provide you with a static (WAN) IP?

When reading some other tutorials I seem to have been convinced that I needed to set up DDNS and an update client because I have a dynamic (WAN) IP address and am not paying for the service of a static (WAN) IP address.

Am I missing something? Thanks again.
old_forum_roidemai
 
Posts: 6
Joined: Thu Jan 01, 1970 12:00 am
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_tedtrp » Thu Jul 24, 2008 12:49 am

Correct, you must set the local IP on your computer to a static IP.

The WAN IP in the router, as long as:

#1 you are not Double NATTED.

#2 you have two routers connected WAN to WAN each other.

#3 or you have a static IP from your ISP.

Does not have to be Static.

-

This site has guides on how to setup a static IP for Windows, Mac, and Xbox.

Do you know how to setup a static IP on openSuSE?

I found with Google, Linux Tutorial - Linux Network Administration

andhttp://forums.opensuse.org/network-internet/389189-how-do-i-configure-my-cable-internet-connection.html

I am not sure that helps you.

---

Moving along (Assuming that you setup a static IP on your linux machine and in your router you are forwarding the ports to that IP)..

What is the port stats from the net (like grc.com shields up)? Open, Closed or Stealth.
old_forum_tedtrp
 
Posts: 17836
Joined: Sat Apr 28, 2007 9:26 pm
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_roidemai » Thu Jul 24, 2008 2:33 am

Fantastic! This is clear and makes sense to me now; thank you for your explanations and help.

So I've set up the static IP and forwarded the port ranges spelled out for in the link for tightVNC
[If someone else on openSuSE-11.0 stumbles on this.. set static ip in yast > network devices > network settings]

I setup the vncserver,
Code: Select all
vncserver :64 -geometry 1024x768 -depth 16 -name *ComputerName*


and when I try to connect to it from my laptop:
Code: Select all
vncviewer -via 192.168.1.1 *ComputerName*@[WAN IP]:64

where 192.168.1.1 is the gateway.

I receive the error:
Code: Select all
ssh: connect to host 192.168.1.1 port 22: Connection timed out
vncviewer: Tunneling command failed: /usr/bin/ssh -f -L 5599:*ComputerName*@[WAN IP]:5964 192.168.1.1 sleep 20.


I forwarded all the ports mentioned for tightVNC and enabled anonymous internet requests, etc... Is there something else I need to do to open port 22 (assuming that is what needs to be done)?
old_forum_roidemai
 
Posts: 6
Joined: Thu Jan 01, 1970 12:00 am
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_roidemai » Thu Jul 24, 2008 5:39 am

Just in case I messed up some syntax for vnc,
I tried to ssh and got the error:

Code: Select all
ssh: connect to host [IP addr] port 22: Connection timed out


Should I have this port forwarding to the static IP of the server? If I don't, I just receive the message, connection refused.

I tried:
Code: Select all
iptables -A INPUT -p tcp --dport 22 -j ACCEPT
on the server side
and
Code: Select all
iptables -A OUTPUT -p tcp --sport 22 -j ACCEPT
on the client side

but I receive the same message.

This may be getting a bit off the original topic, and I could take these questions elsewhere if this is now out of place.
old_forum_roidemai
 
Posts: 6
Joined: Thu Jan 01, 1970 12:00 am
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_tedtrp » Thu Jul 24, 2008 2:16 pm

Instead of entering the default gateway IP, enter in the LAN IP of the computer where the VNC Server is running (this assumes that both computers are behind the NAT Router).

If only one is connected behind the router and the other is on the net. In the portforwarding screen of the router enter in the LAN IP of the computer where the VNC Server is running. On the other computer, enter in the public IP or the (DDNS) domain name.
old_forum_tedtrp
 
Posts: 17836
Joined: Sat Apr 28, 2007 9:26 pm
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_roidemai » Thu Jul 24, 2008 9:29 pm

For the vncviewer, I tried replacing the gateway with the LAN IP of the server, but I receive the same message that port 22 timed out.

I have port 22 open and forwarding to the server, as well as having it open in the iptables (assuming the previous code I found and posted is correctly applied to server and viewer.)

I am able to ssh to other servers from both computers, just not between them.




old_forum_roidemai
 
Posts: 6
Joined: Thu Jan 01, 1970 12:00 am
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_tedtrp » Thu Jul 24, 2008 11:46 pm

Before answering question #2 or 3, please answer number #1

#1http://linux.about.com/od/linux101/l/blnewbie4_3_11.htm

What happens when you enter in vncviewer 192.168.1.2 Where 192.168.1.2 is the server address of the VNC server?

And as need be the port that the VNC server is listening on.. example: vncviewer 192.168.1.2:5190

Powered by Google search for vnc viewer commands

#2 Which VNC is it? www.realvnc.com ?

#3 Did you try asking the people at DSLR (dslreports.com) in the all things Unix/Linux forum, about getting VNC server and client working?
old_forum_tedtrp
 
Posts: 17836
Joined: Sat Apr 28, 2007 9:26 pm
Top

Re: port forwarding -- static ip and ddns

Postby old_forum_roidemai » Fri Jul 25, 2008 11:13 pm

#1 For both commands you suggested (i.e. with and without port specified), I receive the message:
Code: Select all
vncviewer: ConnectToTcpAddr: connect: No route to host
Unable to connect to VNC server


#2 tightVNC

#3 Thank you for suggesting this resource (dslreports); it looks to be quite promising.

I might have to come back to this project in several months though as I am leaving the physical proximity of the vncserver I was trying to setup. I'll make an effort to update this in January or so if I have a resolution to offer.

Thanks for all your help and suggestions.
old_forum_roidemai
 
Posts: 6
Joined: Thu Jan 01, 1970 12:00 am
Top


Topic locked
10 posts • Page 1 of 1

Return to Concepts

Who is online

Users browsing this forum: No registered users and 0 guests

  • Board index
  • The team • Delete all board cookies • All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style Septon Orange. Design by Coloreatuforo.com © 2009.