New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Accessing through a router

Got problems with your B2 or B3? Share and get helped!
Post Reply
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Accessing through a router

Post by 86ivar »

Hi.

Can I access my B2 with easyfind through a router with automatic DHCP settings (no static ip)? Got a linksys wrt54g (not in my hands to test though...)
I have tried to do the same with a freenas NAS setup, but no luck. Dont know how to setup the routing from router to NAS when the ip's are changing and so on...
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Accessing through a router

Post by Ubi »

This really is a question about your router. It has nothing to do with the B2 or with easyfind.
But what you are stating is: I want to set a variable IP address to my server for no specific reason. How do I make the routing table keep up with this variation from DHCP.

Sounds a bit masochistic to me. Why not just set up static routes to the server?
Gordon
Posts: 1465
Joined: 10 Aug 2011, 03:18

Re: Accessing through a router

Post by Gordon »

I'm quite certain that the Linksys can be configured to hand out a "static" IP to a specific MAC address. To find that MAC address just go into the DHCP manager of the Linksys and view the current leases and their associated MAC addresses, or SSH into the B2 and run `ip link show eth0`

* MAC address is a number sequence which uniquely identifies a network adapter. For the B2 this should be something like 00:22:02:xx:xx:xx
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Accessing through a router

Post by 86ivar »

Gordon wrote:I'm quite certain that the Linksys can be configured to hand out a "static" IP to a specific MAC address. To find that MAC address just go into the DHCP manager of the Linksys and view the current leases and their associated MAC addresses, or SSH into the B2 and run `ip link show eth0`

* MAC address is a number sequence which uniquely identifies a network adapter. For the B2 this should be something like 00:22:02:xx:xx:xx
You are right, but your internet provider will have to provide you with a static IP for you to use. Our internet provider cant do that they say :/ I had problems with the Freenas i put up. I thought the router handled out the ip address to my bubba so when i call for it, the ip is invalid, cause it is not global.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Accessing through a router

Post by Ubi »

86ivar you are seriously mixing up two router problems. One is the dns to your dynamic ip, the other is how traffic is routed from the router to the server. The external ip address is usually not passed to the server!

Do not mix these two and try to make it a single discussion, as we'll all get frustrated and you will not get answers
86ivar
Posts: 148
Joined: 02 Oct 2010, 11:08

Re: Accessing through a router

Post by 86ivar »

Ubi wrote:86ivar you are seriously mixing up two router problems. One is the dns to your dynamic ip, the other is how traffic is routed from the router to the server. The external ip address is usually not passed to the server!
That is what I said, I thhink. When it comes to linux and networks it kinda gets myseterious to me. I dont even know the right ansers to ask regarding this topic.
Ubi
Posts: 1549
Joined: 17 Jul 2007, 09:01

Re: Accessing through a router

Post by Ubi »

your first order of business is to assign a static DHCP address to your B3 from your router. This address will be something like 192.168.x.x or 10.0.x.x.
Then tell your router to forward all incoming data for certain ports (like port 80 for web, port 22 for ssh) to this internal IP address.

THEN your second issue is to get to your router from outside your house. For this, the B3 is equipped with easyfind, which couples a known DNS name (86ivar.myownb3.com or something) to the dynamic IP address that your provider is issuing you. I don't know how easyfind works, you need to ask somebody else.

Get part I fixed first.
Gordon
Posts: 1465
Joined: 10 Aug 2011, 03:18

Re: Accessing through a router

Post by Gordon »

86ivar wrote:That is what I said, I thhink. When it comes to linux and networks it kinda gets myseterious to me.
A network is just a bunch of computers being able to communicate with each other because they're somehow aware of each other's presence. In Local Area Networks (LAN) this is most commonly achieved by every computer regularly shouting something like "hello, I'm here - please use me". If you're on an Apple network you'll find that even printers are joining these outbursts of loneliness by crying out for someone to please go and print something.

This is not the case on the normal internet. Here everything is hierarchically assigned in numerical sequences that are not only difficult to work with from the human perspective, but may also be dynamic. This is why we have DNS - a protocol of itself that uses the internet to transport itself - to translate logical names to these number sequences. Dynamic DNS such as Easyfind is simply a DNS service that uses fairly low time-to-live values and allows registrants to alter their own records by some automated method. Essentially it's the same thing as the "hello I'm here" shouting, except for that there's no shouting to everyone around but only to the responsible DNS server.

Confusing? Don't worry, because you can forget everything above if you want to because all of this just happens without requiring you to do anything (well yeah, enable easyfind). What you do need to realize though is that your LAN is not accessible from the internet - anywhere from the internet. This is not only by definition of the internet protocol, but mostly by the implementation used by manufacturers of internet routers. Although the definition allows for ~17 million addresses to be used for LAN environments, practically every internet router will have a LAN address of 192.168.0.1, 192.168.1.1 or 10.0.0.1 (in the early days of ADSL 10.0.0.134 seemed common). So essentially millions upto billions (US) of people are using the same addresses within a range of a possible 759, making it impossible to ever find someone on the internet that claims to have an address within such a range - unless that someone is on the same LAN as you.

This is why internet routers are designed to perform a neat trick called Network Address Translation (NAT). What they do is change the address from the original package to their own internet address (WAN) if it originates from the LAN, so that it seems like the call is being made by the router itself. This is called Source NAT (SNAT) or Masquerading. It can also do the reverse, by posing towards the internet to be the host of a service that is actually being served by another computer on the LAN side. This is called Destination NAT (DNAT) and this is what you require. The important thing here is that this latter type of pretending will not do any type of DNS lookups for every incoming packet, but will forward only to a specific numerical address - therefore any machine hosting services that need to be exposed to the internet require a fixed address inside the LAN in order for the internet router to be able to correctly forward incoming traffic.
flimflam
Posts: 41
Joined: 17 Jul 2013, 10:06
Location: Slovakia

Re: Accessing through a router

Post by flimflam »

Hi I made this few days ago .... in human speech: FIRST READ THE USER MANUAL FOR YOUR B2/B3

Setting in router...
1. when B2/B3 ( without any special settings ) is connected to the router in LAN socket, it have to be visible on the local network and also between connected devices in your router settings. When not something is wrong check again connection.
2. I am 100% sure your router has ability to assign your device ´s ( B2/B3 ) IP with mac address. As Gordon wrote. So mark in router settings allready allocated IP address of your B2/B3 to get all the time same address from your router in your local network. Save settings !
3. Than in differrent screen of router settings where is Port forwarding/translating/triggering, set port which you want to access. For example 21 for FTP service of your B2/B3.Save settings.

Now all needed is setup to access your B2/B3 from outer space /internet out of your B2/B3 ...Why?
Because you have now to set up B2/B3 to accept incoming data on particular ports.
And how to do this....

Setting in your B2/B3
1. Log in in the local network with some internet browser to your B2/B3 as admin. Typing B3 in browser line.
2. Find the site where is your desired service for example FTP and mark it. Enable FTP.
3. Enable easyfind service to be allways ON. Create your own address for example.. (86ivar.myownb3.com ). Save settings.
4. Do not forget to create another user out of admin, which can see all you need from internet poin of view.
5. Logout and type in your browser: "ftp://86ivar.myownb3.com/"...but without "" marks :roll:
6. Log in with your username and enjoy.

This can be analogically created for different services....I prefer not to use browser for FTP, but for this example it is good enogh.

This should work 24/7 and of course your modem+router+B2/B3 should be ON :-)
Gordon
Posts: 1465
Joined: 10 Aug 2011, 03:18

Re: Accessing through a router

Post by Gordon »

Do note that FTP is not the simplest protocol to run through firewalls. This is because it uses two ports where either the firewall on the client side (active FTP) or the one on the server side (passive FTP) must allow a secondary connection to a random unprivileged port (>=1024). Don't be surprised if you can't actually fetch or put files using a web browser or Windows explorer, as these will usually default to using passive FTP which you cannot support if you only open up port 21.
Post Reply