Find the answer to your Linux question:
Results 1 to 4 of 4
I'm trying to setup network server for a week now and I was able to setup network in which i can ping the other workstation that is connected to my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    8

    network connection without internet?


    I'm trying to setup network server for a week now and I was able to setup network in which i can ping the other workstation that is connected to my switch which is also connected to my server and I can also ping the server from local workstation.

    I have 2 NIC, I use eth0 to dial to my dsl connection(ppp0 has the IP of my internet) and
    I use eth1 to connect to the switch and use to connect to the other local workstation


    Now my problem is I don't know how can I share the internet connection from my eth0 or the ppp0 to my eth1 to the network, can anyone shed some light on what do I need to be able to share the internet connection to the workstation that is connected to my switch.

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    699
    you need to setup ipforwarding on the station with internet access, and set that computer as the default gateway on your workstation w/o internet.

    for example,

    internet connects to host1, eth0 (I'll say 192.168.0.1)

    host1 connects to switch using eth1, 192.168.1.200
    host2 connects to switch using eth0, 192.168.1.201


    host1 you need to enable IP forwarding.
    I'm not sure how it works on your distro, but on fedora / Redhat, it is /etc/sysctl.conf, change the line
    net.ipv4.ip_forward = 0
    to
    net.ipv4.ip_forward = 1
    and reboot.

    on host 2, you need to change your default gateway to be 192.168.1.200 (or whatever host1 eth1 IP address is.)
    I can't tell you how to do that, because it differes with distro, but again on fedora / RHEL, you add
    GATEWAY=192.168.1.200
    to your /etc/sysconfig/network file.
    and reboot

    that should be it, but I warn you, I've never done this before, it is all strictly theoretical.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    8
    tried it but didnt work

  4. #4
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134

Posting Permissions

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