Linux Format

NETWORK ADDRESS TRANSLATIO­N

-

Network address translatio­n remaps one IP address to another IP address by changing the network IP address informatio­n in the header of the PDU. The technique is used extensivel­y to optimise the use of public address space. With the number of public IP addresses being used up, NAT enabled multiple private IP addresses to be remapped to one public IP addresses.

In our project we’re using NAT to change IP addresses from the wired network to the wireless network.

The preferred method would be to have routers in each network find and route PDUS between their respective networks, but routers have a cost exponentia­lly higher than the cost of a Pi. Furthermor­e, router placement and configurat­ions can be complex. If the routers aren’t configured correctly, they can cause any amount of grief and aggravatio­ns in a network.

The upshot is that just because you can use a Pi to accomplish a task, doesn’t necessaril­y mean it’s the best solution for the task!

operating systems. iptables comes pre-installed with Raspbian O/S. Remember, PDUS are moving through networks carrying user data. iptables is a command-line firewall service that uses policy chains containing rules to filter incoming and outgoing data PDUS.

We’ll use the command line to configure iptables. There are GUI tools that can be used to configure iptables, but Raspbian doesn’t support a GUI so this tutorial will provide a few of the commands needed to establish a configurat­ion for the Pi project. You need to be careful issuing iptables commands, especially if you’re accessing the Pi over a network SSH connection. A wrong command can lock out your session until you can physically access the Pi and remove the errant rule.

When a network connection tries to establish itself on the Pi interface, iptables looks for a chain rule in its list that matches the request. If iptables doesn’t find a rule, it resorts to the default action defined for the chain.

 ??  ?? Devices on OSI framework with PDU encapsulat­ion thrown in for some colour.
Devices on OSI framework with PDU encapsulat­ion thrown in for some colour.

Newspapers in English

Newspapers from Australia