Port forwarding custom port to local network - portforwarding

I have two ubuntu pc connected directly with Ethernet (with no router) and they have static IPs - 192.156.0.101 (further 101) and 192.156.0.103 (further 103).
I run server on 101 elasticsearch.my:9200 and I need to reach it from another pc 103.
So that is the best way to make it?

Related

Transfer data between two devices on different routers on the same modem

I have two devices, a PC and a RaspberryPi, that are connected to two different routers (one has VPN, one does not), that are connected to the same modem. (See diagram). The two routers are physically separated, so it would be difficult to connect them with a cable.
I am trying to access the RaspberryPi from my PC using SSH to run programs remotely on the Pi, and have the Pi send data that the program scrapes back to my PC for processing.
My question is, is this possible? And if so, how would I be able to implement it?
Thanks
I had this working (prior to my network reconfigure).
What I did was set router A as DHCP server.
Router B was configured as not to hand out IP Addresses.
Connect router A and router B on the LAN side.
All clients went through Router A, unless the devices' IP Settings were changed. I only changed gateway to router B to have the secondary connection.

How to use the RJ45 tool in the CORE network emulator?

I have recently installed the CORE Network Emulator, and have already read the relevant parts of the the docs. CORE promises to be able to connect the virtual networks you create in it with physical once. However, I am having trouble connecting my virtual network to the physical one, which the RJ45 tool promises to do. From what I have read, in the CORE NetEm you can assign a network interface to the RJ45 tool, which then bridges your physical device to the network.
I have tried creating a basic topology, with one virtual host, a router, and then my computer with the RJ45 tool and I am trying to see if I can reach my computer from the host or vice versa with a ping command, but all I get is "network is unreachable."
Unfortunately, the CORE docs don't go into detail in how to use this tool and I wasn't able to find any other sources on the internet which have to do anything with it.
Here you can find the documenation: http://coreemu.github.io/core/usage.html#connecting-with-physical-networks
Does anyone have any experience with CORE and can help me out with this?
Many thanks!
The CORE RJ45 tool creates a Linux bridge between a virtual interface and a physical one.
Example: if you have node n1 linked to an RJ45 node assigned to eth0, after pressing "Start", on the underlying host you'll have a bridge with the n1:eth0 veth0 pair device and your host's eth0 device enslaved.
You'll need to configure routing between your virtual and physical networks. In the above example, suppose n1:eth0 is 10.0.0.1/24. When you plug a physical device into eth0, that device needs a route back to 10.0.0.1. That device may be on the same subnet, for example if it has the address 10.0.0.2/24. If your physical device has an address on a different subnet, you'll need to manually add a route to reach the 10.0.0.0/24 network, via the connecting interface.
I had the same problem. My CORE version is v.5.3.0 (20190615) on Ubuntu 18.04 LTS w/ Linux 5.0.0-37 generic on x86_64. Have OSPF v2, v3, Zegra, and IPForward correctly configured at r1, so that vpc1 can send and receive data successfully.
The RJ45 port of a built-in physical interface on the CORE host was mapped to a virtual endpoint for connecting the 2nd real computer, rpc 192.168.10.10/24 with a virtual switch sw1. Another virtual PC, vpc1 192.168.10.20/24 and a router r1 with 192.168.10.1/24 and 10.0.10.1/24 two interfaces.
Can ping from rpc to vpc1 and to r1 at 192.168.10.1 but not 10.0.10.1 or beyond. However, using the two-node tool or virtual terminal of vpc1, I can also traceroute and ping r1 and beyond.
The reason why the traffic of the real remote PC rpc could not be routed by r1 from 192.168.10.1 to 10.0.10.1 and back was because its WiFi was left on with the gateway configured to a FiOS router. You cannot have two gateways. Once the WiFi got turned off, the traceroute and ping can reach r1 and beyond.
This could also be the root cause of your problem.

two routers in one network; one as gateway, one as DHCP server

My ISP changed their network configuration and now my home setup is not working anymore. I had one Asus router which features like QoS and parental control, my physical network consists of UTP, powerlan and wifi.
In the new setup I'm required to run a new router (functionally crippled) to handle IPTV and telephone, but I would still like to run all my LAN traffic through my Asus for the additional functionality it provides. Not a problem I thought, until it turned out that the IPTV units are required to be connected directly to the new router. Which means all other systems using the powerlan (a.o. a Wifi Access Point) also bypass the Asus. Parental control is useless.
Is there anyway I can setup the new router to only function as a gateway, and let everything go though the Asus?
This setup did not work: internet <-> [extern IP] newrouter [192.168.2.254] <-> [192.168.2.253] Asus [192.168.2.1] <-> LAN [192.168.2.100-199]
The new router has 254 as its LAN IP
The Asus has a static WAN ip of 253, and its LAN IP to 1 (with 254 as the gateway).
DHCP hands out IP configs with 1 as the gateway
Theoretically this means any LAN device getting an IP will send to the Asus on IP 1, it forwards that via 253 to the new router at 254, which pushes it out to the internet.
But alas. Any suggestions if this can be made to work?
I cannot change the subnet on the new router, it is blocked to 255.255.255.0.
I do want wat to run switches everywhere to setup a VLAN.
You could just use a different subnet for your asus router.
e.g. use the 192.168.2.1 address for your asus router and configure DHCP to hand out IPs of that network (192.168.2.x). Then configure your new Router to have the IP 192.168.1.1.
Now add a static route from your asus router to your new router and the other way round. That way every device in the 192.168.2.x network has to go through your asus router.
Of course that does only work if you can configure routes on your new router.

Multiple server behind one public IP address

so I am setting up my home network with multiple Raspberry Pis and I have run into an issue, which might be similar, but not exactly identical to some other queries here on stackoverflow. I am just starting so this might be a pretty newbie question.
Here is the setup: I have a router (a pretty shitty one as we rent the apartment from someone who had the network set up) and want to connect three Raspberry Pis with different functions:
RPi 1 is running a Apache2 Webserver and hosting my owncloud instance. As I do not have a static public IP I am using noip.com to dynamically update a domain to resolve to my current IP - address.
RPi 2 is running a VPN service which I want to be able to use while being on the road, e.g. in Internet Cafés and such.
RPi 3 has a RPi Noir Camera v2 and serves as a Baby Monitor which is accessible via its private IP address within the network.
So, here comes the question: is there a way to access each of these raspberries via their private IP addresses from outside my network?
I.e. I want to be able to access the owncloud, the VPN and the baby monitor via their respective private IP - addresses? Or do I need to find a way to run all these services on a single machine?
Thanks and sorry for asking basic questions.
This can be done via port forwarding on the router.
For example:
for external IP / port 1234 -> forward to internal IP (and possibly different port) of RPi 1
for external IP / port 1235 -> forward to internal IP of RPi 2
and so on..
I use port 1234 as an example for the webserver, because there could be problems when using port 80 on a home network. To access it you can use yourPublicIP:1234/index.html (or dynamic_domain:1234 )

Open website via computer IP address while running tomcat locally with a router?

I'm working on a website for a friend, developing using Eclipse/Tomcat. I'm running it locally and trying to open it via my internet port IP address, but I can't get it to work. The computer I am running it from is connected to a router, so it is running off of 192.168.1.4, and http://192.168.1.4:8080/Mobile_Site/index.jsp works. However when I try and open it via my internet port IP, http://67.xxx.244.xx:8080/Mobile_Site/index.jsp it doesn't find it from any device, even outside my local network. Is there a way to send the link when running locally when connected to a router?
You have to configure your router port forwarding (or virtual servers depending on the router) to forward TCP connections from 67.xxx.244.xx:NNNN to 192.168.1.4:8080.
Then you give the 67.xxx.244.xx:NNNN address to your friend.
Note: NNNN at your router doesn't need to be 8080, as long as the port forwarding is set properly.

Resources