How to enable 1:1 NAT in Iptables

1:1 NAT maps a single Public IP Address to one of your computer within your local area network (LAN).
Unlike port forwarding, 1:1 NAT forwards all ports from one external IP to one internal IP.

iptables -t nat -A POSTROUTING -o eth0 -s -j SNAT --to-source
iptables -t nat -A PREROUTING -i eth0 -d -j DNAT --to-destination
iptables -A FORWARD -s -j ACCEPT
iptables -A FORWARD -d -j ACCEPT

How to enable Port Forwarding in Iptables

What is Port Forwarding

Port forwarding allows remote computers, for example, computers on the Internet, to connect to a specific computer or service within a private local area network (LAN).

How to Install IPP2P in Debian Etch to Filter P2P Traffic in your Network

What is IPP2P

The goal of the IPP2P project is to identify peer-to-peer (P2P) data in IP traffic. For this purpose we extended the iptables/netfilter architecture by a new matching module. Thereby IPP2P integrates itself easily into existing Linux firewalls and it's functionality can be used by adding appropriate filter rules.

How to Configure your Debian Etch or Ubuntu 8.04 box as an Internet Gateway/Router using IP Masquerading

This is a step by step tutorial how to make an Internet Gateway using Debian Etch or Ubuntu 8.04 LTS machine.

1. Configure your NIC

Add two network cards to your pc and install Debian or Ubuntu (I will prefer Debian Etch or Ubuntu 8.04 LTS). Configure the ip address of your network cards.

vi /etc/network/interfaces

Your network card configuration should be look like this:

How to Configure your CentOS 4 box as an Internet Gateway/Router using IP Masquerading

What is IP Masquerading?

IP Masquerade is a form of Network Address Translation or NAT which NAT allows internally connected computers that do not have one or more registered Internet IP addresses to communicate to the Internet via the Linux server's Internet IP address. The software interface which enables one to configure the kernel for IP masquerading is iptables.

To configure IP Masquerading, you need to have two LAN cards, a PC with CentOS 4 Linux installed.
Install the LAN cards and configure the IP address of your public and private network.

1. Configure the IP address of your public network, it should be similar like this one.

Syndicate content