Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • BackTrack 5 R2
  • Wine 1.4 / 1.5.5
  • Mozilla Firefox 12...
  • Ubuntu 11.04
  • Angry Birds 1.1.2.1
  • Ubuntu 10.04.4 LTS
  • Linux Kernel 3.4
  • Ubuntu Manual 10.10
  • Adobe Flash Player...
  • Pidgin 2.10.4
  • Home > Linux > System > Networking

    IPTABLES masquerading firewall

    Download button

    No screenshots available
    Downloads: 491  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Rick Dicaire | More programs
    GPL / FREE
    February 13th, 2007, 18:46 GMT
    ROOT / System / Networking

     Read user reviews (0)  Refer to a friend  Subscribe

    IPTABLES masquerading firewall description

    IPTABLES masquerading firewall is a self contained script that enables and sets basic masquerading at boot time.

    IPTABLES masquerading firewall is a self contained script that enables and sets basic masquerading (assuming kernel kernel support already exists) at boot time. You may use this example, or modify existing init scripts to include the code.

    Under Linux kernel 2.4.x, packet mangling has considerably changed. This includes the masquerading, firewalling, and port forwarding features. This document assumes you're using modules, if you're not, disregard the code in the following script that tests for the loaded module.

    #!/bin/sh

    # YOU MUST SET THE FOLLOWING THREE VARIABLES

    # Set the full path to iptables
    PROG=/path/to/iptables

    # Set network interface to masquerade on. This will be the interface
    # thats connected to the Internet. Possibilities include ppp0, eth0,
    # eth1, etc.
    IFACE=eth0

    # Set machine or network to masquerade. This can be set as hostname, IP address,
    # or network mask, examples:
    # Hostname your_hostname
    # IP address 192.168.1.2
    # Net mask 192.168.1.0/24 This masquerades ALL machines on 192.168.1.x
    INTNET=192.168.1.2

    # Enable IP Masquerading in the kernel
    echo 1 > /proc/sys/net/ipv4/ip_forward

    # Test if iptable_nat module is loaded, its boot time, not likely :)
    if [ -z "`lsmod|grep iptable_nat`" ];
    then
    modprobe iptable_nat
    fi

    # Test if existing MASQ rules exist, its boot time, not likely :)
    if [ -z "`$PROG -L -t nat|grep MASQUERADE`" ];
    then
    $PROG -t nat -A POSTROUTING -o $IFACE -s $INTNET -j MASQUERADE
    fi

    Product's homepage

      


    TAGS:

    IPTABLES firewall | IPTABLES masquerading | masquerading firewall | IPTABLES | masquerading | IP



    HTML code for linking to this page:


    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM