#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Posts
    266
    Rep Power
    14

    Linux as a router


    I am trying to use my linux box as a router so that I can surf using my OSX box. I have tried a few things and failed. I am looking for a good tutorial or explanation of how to do this using Redhat 7.1. I accessing the internet through a dial up modem.

    E.
  2. #2
  3. Advisor
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Location
    Stockholm, Sweden
    Posts
    446
    Rep Power
    15
    I am using IP-tables....

    Haven't got any URL to provide you with but
    search for
    ip tables tutorial linux

    ..in a searchengine
    - [ If I cant fix it, ask MacGyver... ] -
  4. #3
  5. #4
  6. Is a Psycho
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    In your computer
    Posts
    231
    Rep Power
    14
    What ip mask are you using for your Network Card... if your using 198.168.0.X as your IP address (where X = your machine number.. ie: 192.168.0.1) on the network card the following should work (you will need root access of course):

    Open up and edit the file "/etc/rc.d/rc.local" file and add the following:

    Code:
    echo "1" > /proc/sys/net/ipv4/ip_forwarding
    ipchains -P forward DENY
    ipchains -A forward -j MASQ -s 192.168.0.0/24 -d 0.0.0.0/0
    Next open up and edit the file "/etc/sysconfig/network" and add or edit the following line:

    Code:
    FORWARD_IPV4 = yes
    Then reboot...

    Please note this was based on RedHat 6 and it worked, so it may or may not work on other systems... all ya can do is try it and see...

    Another good idea is to install and use Squid Proxy Caching Server...

    Hope this helps

    God Bless
    Scott
    Last edited by deepspring; November 6th, 2001 at 09:35 AM.
    deepspring

    - "Netscape 4 users are like lemmings... You can't help but laugh when one falls off a cliff"
  7. #5
  8. No Profile Picture
    Not there when you need me
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Oct 2001
    Location
    Berlin, Germany
    Posts
    1,430
    Rep Power
    14
  9. #6
  10. Is a Psycho
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    In your computer
    Posts
    231
    Rep Power
    14
    You can even accidently redirect all packets to yourself and lock your machine up... (don't recommend this)...

    Lockout out all of your LAN and block access to certain ports...

    You can even have IP chain wars in the computer labs at uni or college...
    deepspring

    - "Netscape 4 users are like lemmings... You can't help but laugh when one falls off a cliff"
  11. #7
  12. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 1999
    Posts
    52
    Rep Power
    15

    Exclamation Firewall


    If you're using your Linux router to route to a broadband connection such as cable or dsl, you'll need a firewall.

    One of the easier ones I've found to configure would be gShield, but there are dozens of good ones floating around Freshmeat.

    Ref.
    http://freshmeat.net
    http://muse.linuxmafia.org/gshield.html
  13. #8
  14. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2001
    Posts
    4
    Rep Power
    0
    >> johan: I am using IP-tables....

    Good choice.

    >> Alternatively try ipchains

    Bad choice.

    ipchains, being a stateless packet filter, is not secure in design. So do what johan told you to do. You might not concern about security. My whole point is, if you are new to both, pick the best alternative - iptables, and stop wasting your time on learning ipchains.

IMN logo majestic logo threadwatch logo seochat tools logo