need help with ip tables in ubuntu

Discussion in 'Server Operation' started by meomike2000, Apr 10, 2007.

  1. meomike2000

    meomike2000 New Member

    see post below falko's please, thank u

    i need help trying to set up static routes for a ubuntu box that i am trying to use to learn more about linux and the command line. I really dont just want to follow a how-to. I would like to learn more about how to do this. Can somebody lead me to some good info on this that will not be just "cut and paste" or "fill in the blanks". I can do that fine. I really wish to learn.
    thanks in advance,
    Last edited: Apr 13, 2007
  2. falko

    falko Super Moderator ISPConfig Developer

    What exactly do you want to do?
  3. meomike2000

    meomike2000 New Member

    what i am trying to do


    well i am trying to set up the ubuntu box to basicaly become a router for my network.
    i now it isnt good for security reasons, but i have also setup samba to be the master domain controller with file shares.

    once again this is just for a learning experience!!!

    i have a windows xp computer set up as the main gateway.(internet feed)
    it supplies an address to the ubuntu box via dhcp (eth0) as would my cable company.

    my clients are all set up with static ip.
    they connect to eth1 which also has a static ip.

    i can log onto my profiles from all the client computers behind the ubuntu box just fine.

    i can ping all clients from ubuntu box, problem is i can not get none of the client computers to internet or to the xp machine(main internet feed).
    although the ubuntu box can reach the internet so i know that part is right.

    problem i have is that i can not figure out how to setup static route for this to happen.

    this is what i have come up with:
    file /etc/network/interfaces

    #eth0 dhcp internet
    #eth1 static network

    auto lo eth0 eth1

    iface lo inet loopback

    #internet feed
    iface eth0 inet dhcp

    iface eth1 inet static
    address 192.168.x.x
    broadcast 192.168.x.x (same as address, not sure what broadcast is for)
    post-up /etc/


    then i have setup the file

    #test routes1
    #eth0 dhcp internetfeed
    #eth1 192.168.x.x network

    #flush out default route for eth1
    ip route flush dev eth1

    #add correct routes
    #send all local 192.x.x.x traffic to network via eth1
    ip route add to 192.168.x.x/24 dev eth1

    #send all other traffic to internet via eth0
    ip route add to 0/0 dev eth0


    i have set permissins for /etc/ with
    chmod 755
    (not sure if that is right or not)

    i do not really know what the broadcast command does in /etc/network/interfaces or what it should be used for.
    not really sure any of this is right or not.
    can u give me some advice or a link to a place where i can do some research on this. The simpler to understand the better(need plain english explanations)

    thanks in advance,

Share This Page