Debian Admin - Your way to Debian World

September 10, 2006

Activate NAT on Debian etch and Disable IPv6 support on Debian

by @ 9:50 am. Filed under Network

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Activate NAT on Debian etch

What is NAT ?

network address translation (NAT, also known as network masquerading or IP-masquerading) involves re-writing the source and/or destination addresses of IP packets as they pass through a router or firewall. Most systems using NAT do so in order to enable multiple hosts on a private network to access the Internet using a single public IP address (see gateway). According to specifications, routers should not act in this way, but many network administrators find NAT a convenient technique and use it widely. Nonetheless, NAT can introduce complications in communication between hosts.

First, activate IP forwarding in /etc/sysctl.conf and add the following line

# Enable packet forwarding
net.ipv4.ip_forward = 1

If you have already this line just uncomment

Now you need to restart your networking services using the following command

#/etc/init.d/networking restart

Now you need to activate NAT itself in /etc/network/interfaces
auto eth0
iface eth0 inet static
address 192.168.1.254
netmask 255.255.255.0
network 192.168.1.255
up iptables -t nat -A POSTROUTING -o $IFACE -j MASQUERADE

Now you need to restart your networking services using the following command

#/etc/init.d/networking restart

Disable IPv6 support on Debian

IPv6 is still not widely accepted and even less used. Many networked applications in Debian are enabling IPv6 support anyway, which result in a drop in performance and longer delays in day-to-day use.

To disallow ipv6 kernel module autoloading, deactivate it in modutils or module-init-tools in /etc/modprobe.d/aliases.

To disable IPv6 name resolution in Firefox or other Gecko-based browsers, change the following option to true

network.dns.disableIPv6

If you are interested in debian IPV6 Project check here

Tags: , , , ,

You may also be interested in...

One Response to “Activate NAT on Debian etch and Disable IPv6 support on Debian”

  1. Michael G Says:

    auto eth0
    iface eth0 inet static
    address 192.168.1.254
    netmask 255.255.255.0
    network 192.168.1.255
    up iptables -t nat -A POSTROUTING -o $IFACE -j MASQUERADE

    Probably a silly thing, but is not the network line here mixed up with the broadcast address? Should it not say something like this:

    broadcast 192.168.1.255
    network 192.168.1.0

Leave a Reply

Subscribe RSS Feed

subscribe to the Debian Admin RSS feed

Internal links:

Sponsors:



Categories:

Support Debian Admin

Amount $:
Website(Optional):

Sponsors:

Archives:

Related Links:


Favourite Sites:

Wordpress Collection
Windows Reference
Ubuntu Geek
DebianHelp
All About Debian Tutorials
Power Electrical
Check Your IP Here
Debian,Ubuntu News
DebCentral
Tuxmachines
Capnkirby
Libervis
Nuxifield
Linux Horizon
Linux Appfinder
Debuntu
GNU/Linux For Everyone
Free Penguin
DebianAdmin is not related to the Debian Project.
This site is copyright © 2006,2007 Debian Admin
All Trademarks are the property of their respective owners.
The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner.

DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. All use is completely at your own risk. Changes to the existing content and new additions are made to this website periodically, without notification.
Rodney's Kontera DynamiContext Plugin plugged in.