help in iptables

Posted on 2006-05-23
Last Modified: 2010-03-18

I have the following two ethnet setup


The route is set as eth0 ( ) default gateway for all the trafic going outside.

Now, I would like to setup that any trafic going out for 192.168.168.X should use eth1 for the source address.

How do I get this work?
Question by:raza
    LVL 27

    Expert Comment

    Do you mean that:
    route add -net netmask gw dev eth1
    LVL 27

    Expert Comment

    gw should be ajusted according to your network topology

    Author Comment


    how do I del one... I accedentally created for the wrong ethernet infterface. now, I need to delete one.
    LVL 27

    Accepted Solution

    if you need to delete route, use
    route del x.x.x.x gw y.y.y.y

    if you need to delete NIC card, just pull it off your PC :-)

    if you need to disable NIC card, use:
    ifconfig ethX down


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
    Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now