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.

1935 questions
69
votes
1 answer

What is the difference between a Source NAT, Destination NAT and Masquerading?

What is the difference between a Source NAT, Destination NAT and Masquerading? For example, I thought IP Masqurading was what they used to call it in Linux? But what confuses me is that in our Astaro firewall there is IP Masquarading as well as NAT…
hookenz
  • 14,132
  • 22
  • 86
  • 142
61
votes
12 answers

Loopback to forwarded Public IP address from local network - Hairpin NAT

This is a Canonical Question about Hairpin NAT (Loopback NAT). The generic form of this question is: We have a network with clients, a server, and a NAT Router. There is port forwarding on the router to the server so some of it's services are…
adopilot
  • 1,501
  • 6
  • 25
  • 40
45
votes
6 answers

Forwarding ports to guests in libvirt / KVM

How can I forward ports on a server running libvirt/KVM to specified ports on VM's, when using NAT? For example, the host has a public IP of 1.2.3.4. I want to forward port 80 to 10.0.0.1 and port 22 to 10.0.0.2. I assume I need to add iptables…
steveh7
  • 453
  • 1
  • 5
  • 4
34
votes
4 answers

Differences between bridged and NAT networking

I don't fully understand the differences between NAT and a bridged connection over an virtual machine. As far as I've found, machines which are on the same network with our host machine can access our virtual machine if we make a bridged…
oguzhan
  • 441
  • 1
  • 4
  • 5
33
votes
7 answers

How many computers can have the same public IP?

I've got a list of hundreds of page requests from the same IP and I need to know if these could be requests by different computers.
Emanuil Rusev
  • 801
  • 1
  • 9
  • 16
31
votes
5 answers

Will everyone having Globally Accessible IP's in IPv6 be kind of a security nightmare?

Possible Duplicate: Switch to IPv6 and get rid of NAT? Are you kidding? I'm thinking about the way that in IPv4 most of the time you have a single point to configure a firewall on, mainly your router, but if everybody has a Globally Accessible IP…
leeand00
  • 4,807
  • 13
  • 64
  • 106
24
votes
1 answer

Why Are There Only 65,535 Ports, and Will We Ever Have More?

I understand the original reasoning behind having 65,535 ports per IP address: this is the highest number that can be represented by a 16-bit, or 2-byte, number, and it wasn't conceivable that computers would ever be able to spare more than that for…
trysis
  • 385
  • 1
  • 4
  • 10
23
votes
7 answers

Why don't more organizations use inside-to-inside NAT or similar solutions to allow NAT hairpins?

Inside-to-inside NAT aka NAT loopback solves hairpin NAT issues when accessing a web server on the external interface of an ASA or similar device from computers on the internal interface. This prevents DNS admins from having to maintain a duplicate…
MDMarra
  • 100,183
  • 32
  • 195
  • 326
23
votes
11 answers

Windows Server 2008: specifying the default IP address when NIC has multiple addresses

I have a Windows Server which has ~10 IP addresses statically bound. The problem is I don't know how to specify the default IP address. Sometimes when I assign a new address to the NIC, the default IP address changes with the last IP entered in the…
Cédric Boivin
  • 732
  • 4
  • 13
  • 31
21
votes
7 answers

Why is it a bad idea to use multiple NAT layers or is it?

The computer network of an organization has a NAT with 192.168/16 IP address range. There is a department with a server that has an IP address 192.168.x.y and this server handles hosts of this department with another NAT with the IP address range…
Rohit Banga
  • 574
  • 2
  • 5
  • 16
20
votes
5 answers

Are people really going to use public IPv6 addresses on their private networks?

I have been reading the Debian System Administrator's Handbook, and I came across this passage in the gateway section: ...Note that NAT is only relevant for IPv4 and its limited address space; in IPv6, the wide availability of addresses greatly…
Questionmark
  • 321
  • 1
  • 3
  • 9
20
votes
4 answers

Ping: sendmsg: operation not permitted error after installing iptables on Arch GNU/Linux

Yesterday I got a new computer as my homeserver, a HP Proliant Microserver. Installed Arch Linux on it, with kernel version 3.2.12. After installing iptables (1.4.12.2 - the current version AFAIK) and changing the net.ipv4.ip_forward key to 1, and…
estol
  • 361
  • 2
  • 4
  • 10
19
votes
3 answers

What is strict, moderate and open NAT?

NAT options on domestic routers often come configured as strict. What does this mean? What do moderate or open do? Port-forwarding/DMZ access works properly on strict so why bother with the other two? A look through the router suggests this affects…
Metalshark
  • 517
  • 1
  • 5
  • 16
18
votes
4 answers

How to configure a custom NAT for use in Amazon VPC

I have an Ubuntu box I wish to use as NAT instance (among other things). I would prefer to avoid using the NAT AMIs provided by Amazon, and instead configuring NAT myself. Currently, my host has a single network interface (as shown in…
jjmontes
  • 3,247
  • 2
  • 17
  • 27
17
votes
2 answers

Load balancing & NAT-ing multiple ISP connections on Linux

I have two internet connections from two different ISPs and I need to balance the traffic originating to and from my network between the two ISPs. I am using Debian GNU/Linux. My set-up is like this - eth0 (192.168.0.0/24) -- Local network eth1…
1
2 3
99 100