Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! Prioria's Avatar
    Join Date
    Sep 2010
    Gainesville, FL

    Setting up 2-NIC forward for Snort

    Hey guys,

    I installed CentOS 5.7 and Snort on a machine with 2 NICS. I'm going to set up the network like this:

    Modem ===>Snort(IDS)===>Router===>Switch===>Network

    At the moment, I have set up the 2 NICs like so:

    eth0 = (Internal)
    eth1 = (External)

    Before I take down my network to put this in place, I need to make sure it is functioning correctly. I have another machine connected directly to eth1 and trying to test traffic.

    I've been trying to find some CLEAR documentation on setting up a forward so traffic passes through both NICs without issue. I've tried following iptables tutorials, custom scripts, etc and it's just not working. Can anyone help me with this?



  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    The Keystone State
    To turn on forwarding use the following:

    echo 1 > /proc/sys/net/ipv4/ip_forward
    That will turn on forwarding but once you power cycle the system forwarding will stop.
    To fix the system so that forwarding is on at startup you need to edit the sysctl.conf file.

    Edit the file and look for:

    # Controls IP packet forwarding
    net.ipv4.ip_forward = 0
    and change it to

    # Controls IP packet forwarding
    net.ipv4.ip_forward = 1
    This will turn on forwarding when the system is rebooted.

    There are other ways to turn on forwarding on the fly.
    You can find these by GOGGLE'ing for them.
    Google is your friend.

    Also this is more a network question then a server question.


    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts