LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Ubuntu Server using same IPV4 as my computer? (https://www.linuxquestions.org/questions/linux-newbie-8/ubuntu-server-using-same-ipv4-as-my-computer-4175493325/)

TRUNoise 02-01-2014 12:23 AM

Ubuntu Server using same IPV4 as my computer?
 
I think the picture below pretty much explains all of my concern. The page in the picture is of ipchicken.com on my own computer. Below that is a SSH window to the Linux server inside of my house, that has the same IP as my computer. What the heck is happening and will this affect any sort of servers on the Linux box?

The Linux server is connected to the router via Ethernet and my PC is connected via a wireless adapter.

Ubuntu 12.04.4 LTS
64bit

http://puu.sh/6FLEB.png

everest40 02-01-2014 12:41 AM

This is happening because both computers, PC and server, are connected to a router which is doing network address translation.

Quote:

"Network Address Translation (NAT) is a network protocol used in IPv4 networks that allows multiple devices to connect to a public network using the same public IPv4 address. NAT was originally designed in an attempt to help conserve IPv4 addresses." (Wikipedia)
This can make it difficult for servers to accept connections from the outside world. If you want your server to be accessible from outside your local network, I suggest you look up how to do 'port forwarding' on your router.

TRUNoise 02-01-2014 12:43 AM

Quote:

Originally Posted by everest40 (Post 5109083)
This is happening because both computers, PC and server, are connected to a router which is doing network address translation.



This can make it difficult for servers to accept connections from the outside world. If you want your server to be accessible from outside your local network, I suggest you look up how to do 'port forwarding' on your router.

The server itself is port forwarded.

Main PC: Not forwarded
Server: Forwarded

In technicality will the packets still only be sent to the server since it only has the ports forwarded and will connections sometimes be tried and sent to my own PC? Also, is there a way to turn NAT off? I'm on a NETGEAR WNDR3400v

btmiller 02-01-2014 03:39 PM

Your router will send packets sent to your public IP address to your server for those ports which it is configured to do so. You could even have a configuration where some ports are forwarded to your server and others to other machines on your network. Your router takes care of all of this for you.

Whether you can turn this off depends on what kind of Internet service that you have. In general, having multiple publicly-routable IPs requires a miore expensive business Internet service/


All times are GMT -5. The time now is 06:20 AM.