How to configure dd-wrt router, for internet connection from other router in other subnet? - lan

I can not solve this problem.
There modem / router (192.168.1.1) with wifi which distributes online. There wifi and router with dd-wrt, which must also distribute the Internet, but in the subnet 192.168.2.1.
How to configure a router with dd-wrt, that it was possible to connect by cable to the lan port of the first router (192.168.1.1) and when connected to the router on which the dd-wrt on lan or wifi, the device receives from the network ip 192.168.2.X and have access to the internet?

All you should have to do is change the router's LAN address to 192.168.2.1 and adjust the DHCP range and similar parameters to match. All other parameters (other than configuring things you specifically need) can stay at their defaults. Then connect the new router's WAN port to one of the modem/router's LAN ports.

Related

Port Forwarding in order to use running services

Well I'm running ssh server on my laptop which I'm portforwarding to my router and I assume that I can now connect through my routers ipv4 and port in order to tunnel back to my laptop but it doesn't work like that does it.
Can someone explain to me what I need to do in order to make this work. Simply please I don't want to get confused and I know this is a noob question but I went straight to other things instead of learning some basics and now I'm feeling the consequences lol.
Depends from where do you want to access your laptop. If it's just from your local network or LAN, you don't need to setup anything on the router. If, however, you want to access it from the internet, you need to setup port forwarding on the router, but probably also set it up with your ISP.
SSH server setup
SSH server normally runs on port 22 (SSH port). At first your laptop's firewall blocks all incoming traffic! So in order allow people to access your laptop through SSH, you need to tell your firewall to allow incoming traffic on port 22. Also, if you haven't already, set a static IP on your laptop so that you can configure the router for port forwarding and access your laptop easily. And make sure to exclude the static address from the DHCP range (so that your router doesn't your static IP to another device).
LAN connection
In case of SSH connection only on your local network, all you need is the local IP of your laptop. That's it.
WAN connection (internet)
So first, of course, you need to enable port forwarding on your router and specify the port 22 and your laptop's local IP address. But you need to know how are you connected to the internet. Because, ISP's can have an intermediate layer (or layers) network. And this network eventhough is way bigger than you home network is still a private network, and uses private IP addresses. So in order to access your laptop through the internet, you have to talk to your ISP. And the final public IP is the one you would need to access the SSH server.

Create a "bridge" between eth1 and tun0

I'm trying to access remotely a device (in this case a PLC) through a 3G/4G internet connection.
I have a Raspberry PI connect to the internet with a 3G modem and a OpenVPN configured on it.
The eth0 port is connected to the 3G/4G modem and the eth1 port is connected to the PLC.
How do I add the eth1 port to the VPN connection so I can access the PLC trough any computer connected to this VPN?
This images may better explain what I'm tryng to achive:
physical connections
virtual connections

Can't establish a connection NodeJS

I am a novice at networking, I have a NodeJS server running with server.listen(3000, '10.0.0.7'); and have forwarded port 3000 with the internal IP address of my server being 10.0.0.7. I can connect from another machine on my network by putting in the browser: 10.0.0.7:3000. It is my understanding that my external IP address should connect me to the router which should then forward me to the server I have set up on 3000.
Am I missing something important? Because I am unable to connect via the external IP address.
Also please note that my firewall is disabled.
I am neither a network expert so excuse me if I use any incorrect terms. In my understanding, you are right about the current configuration, however you are missing the last step. By default, your router makes your LAN unreachable from a so called “external ip”. Just for the definition: external ip in this case is every ip that is not in your LAN. Imagine if your router would allow any communication without you explicitly giving permission. Every open port on your LAN would be available for the network that your router connects to. That is definitely not desirable.
Lets look at it with an example, quoted from this article:
your router has an ip of: 5.6.7.8 if you access it from outer network (internet)
your router has an ip of: 192.168.1.1 if you access it from your LAN
your laptop is in your LAN and has an ip address of 192.168.1.10 and you want to expose port 3000 from your laptop to the outer network (internet)
You have 2 options:
You can expose the port via the configuration of the router (e.g.: you map 5.6.7.8:3000 to 192.168.1.10:3000 in the router configuration and now it will be accessible from the outer network on 5.6.7.8:3000. Note that you can choose any free port, ports don’t have to match.). Of course it is only possible if you have the option to configure the router and you are willing to do so. (e.g.: if you are not in a café)
You can use some tunneling tools like Ngrok or OpenSSH, which make a direct tunnel between the external machine and your server. This can also work if you don’t have the ability to change the router configuration.
Hope I was able to help. Good luck.

Locally hosted sites not accessible over WiFi

MacBook connected on university network through Ethernet with the following settings.
Configure IPv4: Using DHCP
IP Address: 172.17.15.146
Subnet Mask: 255.255.255.0
Router: 172.17.15.254
DNS Server: 172.24.2.71
Shared my Ethernet connection over WiFi for my android phone.
IP address: 192.168.2.2
IP settings: Using DHCP
Googling MyIP through both devices give the following.
Your public IP address: 202.78.172.162
Local sites like library/ and news/ only accessible over 1st device.
Is there a way to access these sites on the 2nd?
A proxy server on your MacBook will probably let you do what you want. It's a little more involved than file sharing, but things like http://squidman.net/squidman/ can make it a little easier.
After setting up the proxy server, you'll want to set your Android up to use it. You'll want to use the local NAT address of your MacBook (likely 192.168.2.1).

How to login into beaglebone black remotely

I have my beaglebone black running stock Angstrom Linux and is connected to ethernet at my home. I can login from any PC connected to my home network using SSH. I would like to know how can I login from another network, say I am at my office and I am connected to internet. I want to login into my beaglebone black which is connected to internet at my Home. How can I do this?
Thanks in Advance
You have a public IP address, that is given to you by your Internet operator. This public IP however will be different than the IP of your Beagle in your local network.
To login to your Beagle from the Internet, you need to connect to your public IP address, and need to add port forwarding to your router, so that port 22, which is the socket port that is used by ssh, is forwarded from your public IP to your local IP.
So, you need to login to your router management console, and go to "port forwarding" options, and select to forward TCP/IP connections to port 22 be forwarded to your Beagle IP. For this to work longer term, you should set static IP address to your Beagle, otherwise if your board stays offline for long time, the DHCP server on your router will probably assign different IP at some point, and the forwarding would need to be setup again.
There is a good guide on the static IP address setting in Beagle/Angstrom here: http://derekmolloy.ie/set-ip-address-to-be-static-on-the-beaglebone-black/
One more thing: Since your operator will also assign different public IP for you from time to time, you might want to have some kind of Dynamic DNS service in use. With this kind of service, you can create your "custom" DNS address (for example user3180454.no-ip.com), that will always point to your Public IP address to which you can create ssh connection (the service will require some method to keep this IP address up to date, you will see instructions on how to do it from the service you use).
Couple services like this:
http://no-ip.com/
http://freedns.afraid.org/
You might also want to try out the Weaved connection service installer for BeagleBone Black. I'm using it to connect:
SSH on port 22
BBB web server on port 80
tightVNC server on port 5901
Shell in a Box on port 4200
Apache web server on port 8080
See:
https://developer.weaved.com/portal/members/betabeagle.php
If you are:
Connecting to from a BeagleBoard via USB Ethernet
from Mac Air running Mavericks & connected to web via Wifi
I found this very helpful:
http://makezine.com/2012/07/16/use-your-mac-laptop-as-a-wireless-proxy-for-raspberry-pi/
In short >> install/run a proxy server (with Squidman) & your life will be easier.
I know this is an old question. But I thought I'd suggest another option. I use TeamViewer (https://www.teamviewer.com) to connect to my work/home computers. You could use something like this to connect to your home computer from the office. Once connected to your home computer, you could then do whatever you need to do on your home network. No port forwarding required.

Resources