Questions tagged [nat]

In computer networking, network address translation (NAT) is the process of modifying network address information in datagram (IP) packet headers while in transit across a traffic routing device for the purpose of remapping one IP address space into another.

Most often today, NAT is used in conjunction with network masquerading (or IP masquerading) which is a technique that hides an entire IP address space, usually consisting of private network IP addresses (RFC 1918), behind a single IP address in another, often public address space. This mechanism is implemented in a routing device that uses stateful translation tables to map the "hidden" addresses into a single IP address and readdresses the outgoing Internet Protocol (IP) packets on exit so that they appear to originate from the router. In the reverse communications path, responses are mapped back to the originating IP address using the rules ("state") stored in the translation tables. The translation table rules established in this fashion are flushed after a short period unless new traffic refreshes their state.

As described, the method enables communication through the router only when the conversation originates in the masqueraded network, since this establishes the translation tables. For example, a web browser in the masqueraded network can browse a website outside, but a web browser outside could not browse a web site in the masqueraded network. However, most NAT devices today allow the network administrator to configure translation table entries for permanent use. This feature is often referred to as "static NAT" or port forwarding and allows traffic originating in the "outside" network to reach designated hosts in the masqueraded network.

Because of the popularity of this technique (see below), the term NAT has become virtually synonymous with the method of IP masquerading.

Network address translation has serious drawbacks on the quality of Internet connectivity and requires careful attention to the details of its implementation. As a result, many methods have been devised to alleviate the issues encountered. See the article on NAT traversal.

2002 questions
17
votes
1 answer

Create a multi-homed linux load balancer with two internet connections and one LAN connection

OK,... this has possibly been answered, unfortunately, I have not found anything that looks like it might be the resolution. Ive looked at these pages and they have some useful information, but not complete resolutions: Load balancing & NAT-ing…
John Schultz
  • 383
  • 1
  • 2
  • 12
17
votes
3 answers

Exposing multiple servers behind NAT using a single public IP address

This is a Canonical Question about NAT and DNS I'm currently trying to set up a network with a DMZ containing a web server and an e-mail server separated from the Internet by a network address translating (NAT) firewall. I have installed the NAT…
Atrotygma
  • 271
  • 1
  • 2
  • 5
17
votes
3 answers

VMWare networking mode (NAT or Bridged)?

I am running Windows 7 within a virtual Machine from my Mac. I use Windows 7 for Visual Studio primarily and also to host a dev install of IIS. There are two things I need and I am not sure what networking mode is needed ... I need to be able to…
webworm
  • 604
  • 2
  • 8
  • 18
16
votes
1 answer

How are cellphone IP addresses assigned?

When my cellphone accesses a website via the tower and its GPRS gateway, NAT ensures that the sites receive a public IP. Would all phones using a single tower have the same IP? If yes, then how can the mass of received HTTP data routed to the…
Robin Rodricks
  • 560
  • 2
  • 12
  • 27
16
votes
3 answers

Public static ip for vagrant box

I have server (Debian Squeeze) with 1 ethernet card and 2 public static IPs (188.120.245.4 and 188.120.244.5). What I want: Setup virtual box (Ubuntu) with access via static IP (188.120.244.5). What I was trying: config.vm.forward_port - good…
Numbata
  • 183
  • 1
  • 1
  • 8
16
votes
2 answers

How to configure a static wildcard subdomain with dnsmasq

I have a network behind a NAT with a few machines. The machines are: router - NAT, dnsmasq, forwarding - directly connected to the inet server - which runs ssh, www and some other stuff clients - which do stuff on server I also have…
Prody
  • 613
  • 3
  • 7
  • 16
15
votes
3 answers

How to Set Up Linux Server As A Router with NAT

We have a simple router which has NAT of symmetric type, but because this router doesn't provide us with any debugging interface, we cannot figure out if a specific packet reaches the NAT or not. Thus we want to setup a LINUX computer making it…
Steve Peng
  • 559
  • 1
  • 8
  • 18
14
votes
4 answers

iptables nat does not exist

Today my iptables nat on the host system stopped working and I have no clue what happend! (That's very bad, I know) All commands are executed as root user. If I run $ iptables -t nat -L I get the following error message: $ iptables -t nat…
lszrh
  • 683
  • 3
  • 7
  • 15
14
votes
7 answers

Accessing the DNAT'ted webserver from inside the LAN

I have a small network with a router, which maintains a connection to Internet, a server and some workstations in a local network. Server is meant to be accessed from the Internet, and there are several DNAT entries set in the router iptables, like…
Catherine
  • 484
  • 1
  • 3
  • 11
13
votes
3 answers

AWS: NAT Gateway in public subnet. Why?

As I understand it, a public subnet is one that can route traffic to the internet via an Internet Gateway, and a private subnet is one that cannot (can't reach the internet nor it can be reached from it). In order to reach the internet, a private…
Julian
  • 545
  • 3
  • 6
  • 16
13
votes
5 answers

NAT Gateway - Maximum connection limit

I know just enough networking to be dangerous. The nitty gritty low level details of NAT are not something I am particularly knowledgeable about. I accidentally found myself in a discussion earlier today about placing a bunch of our nodes behind a…
Daniel Widrick
  • 3,488
  • 2
  • 13
  • 27
13
votes
2 answers

IPv6 without nat but what about an isp change?

I haven't worked with IPv6 outside of 4to6 tunneling on my home pc with stuff like GoGoNet. I've read about how it works in a general way. No NAT required (or suggested) and each client uses a public ipv6 address and I understand the continued use…
Halfdone
  • 163
  • 2
  • 9
12
votes
4 answers

Is it possible to configure a reverse VPN tunnel?

Basically, my goal is to have a 100% portable and independent server. I'm building it using a Raspberry Pi powered by solar panels and batteries, and it is to be connected to the internet using a 4g hotspot. It only needs to have 2 functions, an SSH…
Nikita240
  • 219
  • 1
  • 3
  • 11
12
votes
2 answers

How to persist iptables configuration on Amazon EC2 VPC NAT Ami?

I have a small script like this to configure the iptables: #!/bin/bash PRE_STR="iptables -t nat -A PREROUTING -p tcp -j DNAT" FOR_STR="iptables -A FORWARD -p tcp -j ACCEPT" ##################################### #…
d0x
  • 223
  • 1
  • 2
  • 8
12
votes
4 answers

What happens if two local systems download the same resource on same port?

I'm aware of NAT table. I just want to know what happens if two clients in a private local area network want to download exactly the same resource on the same port? In other words , When a packet comes from the server, how can the router decide…
S.B
  • 231
  • 2
  • 8