Join two network interfaces using the same port

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
0
down vote

favorite












I have 2 hosts



  • one with two network interfaces: 10.0.0.1 and 172.0.0.1

  • second with one network interface : 172.0.0.2

the two hosts are connected to each other using the 172.0.0.0



The first host expose one port via the 10.0.0.1 interface let's say 8088



I want the second host to connect to this port without using routing or ip forwarding let's say when I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088.



How can I do this?



the 10.0.0.1:8088 is a http protocol.



Thank you.



Update



I am very sorry maybe I didn't explaine well my problem.



I have a HTTP service listening only on 10.0.0.1:8088(network interface) so when I do localhost:8088 or 172.0.0.1:8088 it doesn't work.



now I want to open a new port on the 172.0.0.1 interface that expose the same content as 10.0.0.1:8088 without changing the HTTP service configuration.



the idea behind this is to be able to use 172.0.0.1:8088 same as 10.0.0.1:8088 without changing the HTTP server configuration.



ifconfig



eth0 Link encap:Ethernet HWaddr 02:42:0a:00:00:02 
inet addr:10.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 02:42:ac:12:00:02
inet addr:172.0.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:187 errors:0 dropped:0 overruns:0 frame:0
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:193840 (193.8 KB) TX bytes:11435 (11.4 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:192 (192.0 B) TX bytes:192 (192.0 B)


netstat -tulpn



Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 30/sshd
tcp 0 0 10.0.0.1:8088 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8030 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8031 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8032 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8033 0.0.0.0:* LISTEN 598/java
tcp 0 0 127.0.0.11:43077 0.0.0.0:* LISTEN -
tcp 0 0 10.0.0.1:9000 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 414/java
tcp6 0 0 :::22 :::* LISTEN 30/sshd
udp 0 0 127.0.0.11:35495 0.0.0.0:* -









share|improve this question























  • 172.0.0.1 and 172.0.0.2 are both public IP ranges. 10.0.0.0/8 is a private IP range. They don't communicate properly with each other without some chaotic routing rules.
    – Thomas Ward♦
    Mar 23 at 17:21











  • DO me a favor though, on the system with 10.0.0.1, check netstat -tulpn and add the output to your question as an edit.
    – Thomas Ward♦
    Mar 23 at 17:24










  • I am not looking to communicate them with each other. I only want to expose a port via the second interface without touching the configuration of the service that expose 8088 port.
    – Mohamed Amine Ouali
    Mar 23 at 17:25






  • 1




    check my second comment, I"m asking you to provide information about the port / IP bindings on the system that has both 172.0.0.1 and 10.0.0.1 on it. Also, do me a favor, and explain what you mean by "When I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088" - are you saying that whether you access it from 10.0.0.x or 172.0.0.1 on port 8088 you want it to show the same content?
    – Thomas Ward♦
    Mar 23 at 17:26










  • So I want to expose 10.0.0.1:8088 to 172.0.0.1:port without changing the config of the service listening on 10.0.0.1:8088
    – Mohamed Amine Ouali
    Mar 23 at 17:59














up vote
0
down vote

favorite












I have 2 hosts



  • one with two network interfaces: 10.0.0.1 and 172.0.0.1

  • second with one network interface : 172.0.0.2

the two hosts are connected to each other using the 172.0.0.0



The first host expose one port via the 10.0.0.1 interface let's say 8088



I want the second host to connect to this port without using routing or ip forwarding let's say when I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088.



How can I do this?



the 10.0.0.1:8088 is a http protocol.



Thank you.



Update



I am very sorry maybe I didn't explaine well my problem.



I have a HTTP service listening only on 10.0.0.1:8088(network interface) so when I do localhost:8088 or 172.0.0.1:8088 it doesn't work.



now I want to open a new port on the 172.0.0.1 interface that expose the same content as 10.0.0.1:8088 without changing the HTTP service configuration.



the idea behind this is to be able to use 172.0.0.1:8088 same as 10.0.0.1:8088 without changing the HTTP server configuration.



ifconfig



eth0 Link encap:Ethernet HWaddr 02:42:0a:00:00:02 
inet addr:10.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 02:42:ac:12:00:02
inet addr:172.0.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:187 errors:0 dropped:0 overruns:0 frame:0
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:193840 (193.8 KB) TX bytes:11435 (11.4 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:192 (192.0 B) TX bytes:192 (192.0 B)


netstat -tulpn



Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 30/sshd
tcp 0 0 10.0.0.1:8088 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8030 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8031 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8032 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8033 0.0.0.0:* LISTEN 598/java
tcp 0 0 127.0.0.11:43077 0.0.0.0:* LISTEN -
tcp 0 0 10.0.0.1:9000 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 414/java
tcp6 0 0 :::22 :::* LISTEN 30/sshd
udp 0 0 127.0.0.11:35495 0.0.0.0:* -









share|improve this question























  • 172.0.0.1 and 172.0.0.2 are both public IP ranges. 10.0.0.0/8 is a private IP range. They don't communicate properly with each other without some chaotic routing rules.
    – Thomas Ward♦
    Mar 23 at 17:21











  • DO me a favor though, on the system with 10.0.0.1, check netstat -tulpn and add the output to your question as an edit.
    – Thomas Ward♦
    Mar 23 at 17:24










  • I am not looking to communicate them with each other. I only want to expose a port via the second interface without touching the configuration of the service that expose 8088 port.
    – Mohamed Amine Ouali
    Mar 23 at 17:25






  • 1




    check my second comment, I"m asking you to provide information about the port / IP bindings on the system that has both 172.0.0.1 and 10.0.0.1 on it. Also, do me a favor, and explain what you mean by "When I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088" - are you saying that whether you access it from 10.0.0.x or 172.0.0.1 on port 8088 you want it to show the same content?
    – Thomas Ward♦
    Mar 23 at 17:26










  • So I want to expose 10.0.0.1:8088 to 172.0.0.1:port without changing the config of the service listening on 10.0.0.1:8088
    – Mohamed Amine Ouali
    Mar 23 at 17:59












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have 2 hosts



  • one with two network interfaces: 10.0.0.1 and 172.0.0.1

  • second with one network interface : 172.0.0.2

the two hosts are connected to each other using the 172.0.0.0



The first host expose one port via the 10.0.0.1 interface let's say 8088



I want the second host to connect to this port without using routing or ip forwarding let's say when I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088.



How can I do this?



the 10.0.0.1:8088 is a http protocol.



Thank you.



Update



I am very sorry maybe I didn't explaine well my problem.



I have a HTTP service listening only on 10.0.0.1:8088(network interface) so when I do localhost:8088 or 172.0.0.1:8088 it doesn't work.



now I want to open a new port on the 172.0.0.1 interface that expose the same content as 10.0.0.1:8088 without changing the HTTP service configuration.



the idea behind this is to be able to use 172.0.0.1:8088 same as 10.0.0.1:8088 without changing the HTTP server configuration.



ifconfig



eth0 Link encap:Ethernet HWaddr 02:42:0a:00:00:02 
inet addr:10.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 02:42:ac:12:00:02
inet addr:172.0.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:187 errors:0 dropped:0 overruns:0 frame:0
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:193840 (193.8 KB) TX bytes:11435 (11.4 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:192 (192.0 B) TX bytes:192 (192.0 B)


netstat -tulpn



Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 30/sshd
tcp 0 0 10.0.0.1:8088 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8030 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8031 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8032 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8033 0.0.0.0:* LISTEN 598/java
tcp 0 0 127.0.0.11:43077 0.0.0.0:* LISTEN -
tcp 0 0 10.0.0.1:9000 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 414/java
tcp6 0 0 :::22 :::* LISTEN 30/sshd
udp 0 0 127.0.0.11:35495 0.0.0.0:* -









share|improve this question















I have 2 hosts



  • one with two network interfaces: 10.0.0.1 and 172.0.0.1

  • second with one network interface : 172.0.0.2

the two hosts are connected to each other using the 172.0.0.0



The first host expose one port via the 10.0.0.1 interface let's say 8088



I want the second host to connect to this port without using routing or ip forwarding let's say when I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088.



How can I do this?



the 10.0.0.1:8088 is a http protocol.



Thank you.



Update



I am very sorry maybe I didn't explaine well my problem.



I have a HTTP service listening only on 10.0.0.1:8088(network interface) so when I do localhost:8088 or 172.0.0.1:8088 it doesn't work.



now I want to open a new port on the 172.0.0.1 interface that expose the same content as 10.0.0.1:8088 without changing the HTTP service configuration.



the idea behind this is to be able to use 172.0.0.1:8088 same as 10.0.0.1:8088 without changing the HTTP server configuration.



ifconfig



eth0 Link encap:Ethernet HWaddr 02:42:0a:00:00:02 
inet addr:10.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

eth1 Link encap:Ethernet HWaddr 02:42:ac:12:00:02
inet addr:172.0.0.1 Bcast:0.0.0.0 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:187 errors:0 dropped:0 overruns:0 frame:0
TX packets:137 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:193840 (193.8 KB) TX bytes:11435 (11.4 KB)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:192 (192.0 B) TX bytes:192 (192.0 B)


netstat -tulpn



Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:50070 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 30/sshd
tcp 0 0 10.0.0.1:8088 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8030 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8031 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8032 0.0.0.0:* LISTEN 598/java
tcp 0 0 10.0.0.1:8033 0.0.0.0:* LISTEN 598/java
tcp 0 0 127.0.0.11:43077 0.0.0.0:* LISTEN -
tcp 0 0 10.0.0.1:9000 0.0.0.0:* LISTEN 197/java
tcp 0 0 0.0.0.0:50090 0.0.0.0:* LISTEN 414/java
tcp6 0 0 :::22 :::* LISTEN 30/sshd
udp 0 0 127.0.0.11:35495 0.0.0.0:* -






networking server network-manager






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 23 at 18:01

























asked Mar 23 at 17:13









Mohamed Amine Ouali

32




32











  • 172.0.0.1 and 172.0.0.2 are both public IP ranges. 10.0.0.0/8 is a private IP range. They don't communicate properly with each other without some chaotic routing rules.
    – Thomas Ward♦
    Mar 23 at 17:21











  • DO me a favor though, on the system with 10.0.0.1, check netstat -tulpn and add the output to your question as an edit.
    – Thomas Ward♦
    Mar 23 at 17:24










  • I am not looking to communicate them with each other. I only want to expose a port via the second interface without touching the configuration of the service that expose 8088 port.
    – Mohamed Amine Ouali
    Mar 23 at 17:25






  • 1




    check my second comment, I"m asking you to provide information about the port / IP bindings on the system that has both 172.0.0.1 and 10.0.0.1 on it. Also, do me a favor, and explain what you mean by "When I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088" - are you saying that whether you access it from 10.0.0.x or 172.0.0.1 on port 8088 you want it to show the same content?
    – Thomas Ward♦
    Mar 23 at 17:26










  • So I want to expose 10.0.0.1:8088 to 172.0.0.1:port without changing the config of the service listening on 10.0.0.1:8088
    – Mohamed Amine Ouali
    Mar 23 at 17:59
















  • 172.0.0.1 and 172.0.0.2 are both public IP ranges. 10.0.0.0/8 is a private IP range. They don't communicate properly with each other without some chaotic routing rules.
    – Thomas Ward♦
    Mar 23 at 17:21











  • DO me a favor though, on the system with 10.0.0.1, check netstat -tulpn and add the output to your question as an edit.
    – Thomas Ward♦
    Mar 23 at 17:24










  • I am not looking to communicate them with each other. I only want to expose a port via the second interface without touching the configuration of the service that expose 8088 port.
    – Mohamed Amine Ouali
    Mar 23 at 17:25






  • 1




    check my second comment, I"m asking you to provide information about the port / IP bindings on the system that has both 172.0.0.1 and 10.0.0.1 on it. Also, do me a favor, and explain what you mean by "When I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088" - are you saying that whether you access it from 10.0.0.x or 172.0.0.1 on port 8088 you want it to show the same content?
    – Thomas Ward♦
    Mar 23 at 17:26










  • So I want to expose 10.0.0.1:8088 to 172.0.0.1:port without changing the config of the service listening on 10.0.0.1:8088
    – Mohamed Amine Ouali
    Mar 23 at 17:59















172.0.0.1 and 172.0.0.2 are both public IP ranges. 10.0.0.0/8 is a private IP range. They don't communicate properly with each other without some chaotic routing rules.
– Thomas Ward♦
Mar 23 at 17:21





172.0.0.1 and 172.0.0.2 are both public IP ranges. 10.0.0.0/8 is a private IP range. They don't communicate properly with each other without some chaotic routing rules.
– Thomas Ward♦
Mar 23 at 17:21













DO me a favor though, on the system with 10.0.0.1, check netstat -tulpn and add the output to your question as an edit.
– Thomas Ward♦
Mar 23 at 17:24




DO me a favor though, on the system with 10.0.0.1, check netstat -tulpn and add the output to your question as an edit.
– Thomas Ward♦
Mar 23 at 17:24












I am not looking to communicate them with each other. I only want to expose a port via the second interface without touching the configuration of the service that expose 8088 port.
– Mohamed Amine Ouali
Mar 23 at 17:25




I am not looking to communicate them with each other. I only want to expose a port via the second interface without touching the configuration of the service that expose 8088 port.
– Mohamed Amine Ouali
Mar 23 at 17:25




1




1




check my second comment, I"m asking you to provide information about the port / IP bindings on the system that has both 172.0.0.1 and 10.0.0.1 on it. Also, do me a favor, and explain what you mean by "When I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088" - are you saying that whether you access it from 10.0.0.x or 172.0.0.1 on port 8088 you want it to show the same content?
– Thomas Ward♦
Mar 23 at 17:26




check my second comment, I"m asking you to provide information about the port / IP bindings on the system that has both 172.0.0.1 and 10.0.0.1 on it. Also, do me a favor, and explain what you mean by "When I do 172.0.0.1:8088 I automatically get the 10.0.0.1:8088" - are you saying that whether you access it from 10.0.0.x or 172.0.0.1 on port 8088 you want it to show the same content?
– Thomas Ward♦
Mar 23 at 17:26












So I want to expose 10.0.0.1:8088 to 172.0.0.1:port without changing the config of the service listening on 10.0.0.1:8088
– Mohamed Amine Ouali
Mar 23 at 17:59




So I want to expose 10.0.0.1:8088 to 172.0.0.1:port without changing the config of the service listening on 10.0.0.1:8088
– Mohamed Amine Ouali
Mar 23 at 17:59










1 Answer
1






active

oldest

votes

















up vote
0
down vote



accepted










Specifically for the service you're discussing here listening on port 8080, it speaks HTTP. Further, it's only running on 10.0.0.1:8088.



We can configure nginx, which is a web server software, to work on the IP and port binding of 172.0.0.1:8088.



First, install nginx: sudo apt-get install nginx



Once installed, shut down the NGINX service by running: sudo systemctl stop nginx or sudo service nginx stop.



Remove the default configuration file from NGINX's startup config:



sudo rm /etc/nginx/sites-enabled/default


Create a configuration file at /etc/nginx/sites-available named "8088_reverse_proxy" or whatever name you want to give this configuration file, so you know what it does. Once you've created the file, put the following text into the configuration file:



server 
listen 172.0.0.1:8088;

server_name 172.0.0.1;

location /
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://10.0.0.1:8088;
proxy_intercept_errors on;




Save the file once you've entered this.



Then, make a symlink to this configuration file in /etc/nginx/sites-enabled:



sudo ln -s /etc/nginx/sites-available/[FILENAME] /etc/nginx/sites-enabled/


... making sure to replace [FILENAME] with the exact filename you chose for the configuration file.



Then, start the nginx service once this is done with either sudo service nginx start or sudo systemctl start nginx.



You should then, from any other computer on the 172.0.0.X subnet, or anywhere if this is an Internet address, be able to access the service on 172.0.0.1:8088 by typing http://172.0.0.1:8088 into the address bar for the other system.






share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018641%2fjoin-two-network-interfaces-using-the-same-port%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote



    accepted










    Specifically for the service you're discussing here listening on port 8080, it speaks HTTP. Further, it's only running on 10.0.0.1:8088.



    We can configure nginx, which is a web server software, to work on the IP and port binding of 172.0.0.1:8088.



    First, install nginx: sudo apt-get install nginx



    Once installed, shut down the NGINX service by running: sudo systemctl stop nginx or sudo service nginx stop.



    Remove the default configuration file from NGINX's startup config:



    sudo rm /etc/nginx/sites-enabled/default


    Create a configuration file at /etc/nginx/sites-available named "8088_reverse_proxy" or whatever name you want to give this configuration file, so you know what it does. Once you've created the file, put the following text into the configuration file:



    server 
    listen 172.0.0.1:8088;

    server_name 172.0.0.1;

    location /
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_pass http://10.0.0.1:8088;
    proxy_intercept_errors on;




    Save the file once you've entered this.



    Then, make a symlink to this configuration file in /etc/nginx/sites-enabled:



    sudo ln -s /etc/nginx/sites-available/[FILENAME] /etc/nginx/sites-enabled/


    ... making sure to replace [FILENAME] with the exact filename you chose for the configuration file.



    Then, start the nginx service once this is done with either sudo service nginx start or sudo systemctl start nginx.



    You should then, from any other computer on the 172.0.0.X subnet, or anywhere if this is an Internet address, be able to access the service on 172.0.0.1:8088 by typing http://172.0.0.1:8088 into the address bar for the other system.






    share|improve this answer
























      up vote
      0
      down vote



      accepted










      Specifically for the service you're discussing here listening on port 8080, it speaks HTTP. Further, it's only running on 10.0.0.1:8088.



      We can configure nginx, which is a web server software, to work on the IP and port binding of 172.0.0.1:8088.



      First, install nginx: sudo apt-get install nginx



      Once installed, shut down the NGINX service by running: sudo systemctl stop nginx or sudo service nginx stop.



      Remove the default configuration file from NGINX's startup config:



      sudo rm /etc/nginx/sites-enabled/default


      Create a configuration file at /etc/nginx/sites-available named "8088_reverse_proxy" or whatever name you want to give this configuration file, so you know what it does. Once you've created the file, put the following text into the configuration file:



      server 
      listen 172.0.0.1:8088;

      server_name 172.0.0.1;

      location /
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_pass http://10.0.0.1:8088;
      proxy_intercept_errors on;




      Save the file once you've entered this.



      Then, make a symlink to this configuration file in /etc/nginx/sites-enabled:



      sudo ln -s /etc/nginx/sites-available/[FILENAME] /etc/nginx/sites-enabled/


      ... making sure to replace [FILENAME] with the exact filename you chose for the configuration file.



      Then, start the nginx service once this is done with either sudo service nginx start or sudo systemctl start nginx.



      You should then, from any other computer on the 172.0.0.X subnet, or anywhere if this is an Internet address, be able to access the service on 172.0.0.1:8088 by typing http://172.0.0.1:8088 into the address bar for the other system.






      share|improve this answer






















        up vote
        0
        down vote



        accepted







        up vote
        0
        down vote



        accepted






        Specifically for the service you're discussing here listening on port 8080, it speaks HTTP. Further, it's only running on 10.0.0.1:8088.



        We can configure nginx, which is a web server software, to work on the IP and port binding of 172.0.0.1:8088.



        First, install nginx: sudo apt-get install nginx



        Once installed, shut down the NGINX service by running: sudo systemctl stop nginx or sudo service nginx stop.



        Remove the default configuration file from NGINX's startup config:



        sudo rm /etc/nginx/sites-enabled/default


        Create a configuration file at /etc/nginx/sites-available named "8088_reverse_proxy" or whatever name you want to give this configuration file, so you know what it does. Once you've created the file, put the following text into the configuration file:



        server 
        listen 172.0.0.1:8088;

        server_name 172.0.0.1;

        location /
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://10.0.0.1:8088;
        proxy_intercept_errors on;




        Save the file once you've entered this.



        Then, make a symlink to this configuration file in /etc/nginx/sites-enabled:



        sudo ln -s /etc/nginx/sites-available/[FILENAME] /etc/nginx/sites-enabled/


        ... making sure to replace [FILENAME] with the exact filename you chose for the configuration file.



        Then, start the nginx service once this is done with either sudo service nginx start or sudo systemctl start nginx.



        You should then, from any other computer on the 172.0.0.X subnet, or anywhere if this is an Internet address, be able to access the service on 172.0.0.1:8088 by typing http://172.0.0.1:8088 into the address bar for the other system.






        share|improve this answer












        Specifically for the service you're discussing here listening on port 8080, it speaks HTTP. Further, it's only running on 10.0.0.1:8088.



        We can configure nginx, which is a web server software, to work on the IP and port binding of 172.0.0.1:8088.



        First, install nginx: sudo apt-get install nginx



        Once installed, shut down the NGINX service by running: sudo systemctl stop nginx or sudo service nginx stop.



        Remove the default configuration file from NGINX's startup config:



        sudo rm /etc/nginx/sites-enabled/default


        Create a configuration file at /etc/nginx/sites-available named "8088_reverse_proxy" or whatever name you want to give this configuration file, so you know what it does. Once you've created the file, put the following text into the configuration file:



        server 
        listen 172.0.0.1:8088;

        server_name 172.0.0.1;

        location /
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://10.0.0.1:8088;
        proxy_intercept_errors on;




        Save the file once you've entered this.



        Then, make a symlink to this configuration file in /etc/nginx/sites-enabled:



        sudo ln -s /etc/nginx/sites-available/[FILENAME] /etc/nginx/sites-enabled/


        ... making sure to replace [FILENAME] with the exact filename you chose for the configuration file.



        Then, start the nginx service once this is done with either sudo service nginx start or sudo systemctl start nginx.



        You should then, from any other computer on the 172.0.0.X subnet, or anywhere if this is an Internet address, be able to access the service on 172.0.0.1:8088 by typing http://172.0.0.1:8088 into the address bar for the other system.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 23 at 18:37









        Thomas Ward♦

        41.5k23112166




        41.5k23112166



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1018641%2fjoin-two-network-interfaces-using-the-same-port%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            Which professions warranted travel in Medieval times?

            Trouble downloading packages list due to a “Hash sum mismatch” error

            How do so many people here on Academia.SE, and in general, afford lavish higher education programs?