Closed Thread
Results 1 to 2 of 2

Thread: Internet Sharing

  1. #1
    Grub is offline Learning Programmer
    Join Date
    Dec 2006
    Posts
    57
    Rep Power
    0

    Internet Sharing

    I have Linux Install and a Windows XP Machine. I'd like to:

    1) I have an internet connection connected to the Linux PC and works fine , I want to share this connection with one of the windows PC's (bridge connection).
    2) I want to browse the Windows workgroups and to connect to a shared printer connected to one of the Windows computers also i want others to be able to browse the Linux PC.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Jordan Guest
    make a file named 'rc.nat' and put the following script in it.

    Code:
    # Defines the location of iptables executables. 
    iptables=/sbin/iptables 
      
      #Clears if any old iptable rules/ policies are there. 
    iptables --flush -t nat 
     
     # Now we will do Masquerading ie. we are doing NAT. 
    iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE 
    iptables --append FORWARD --in-interface eth0 -j ACCEPT 
     
     # Enabling packet forwarding. 
    echo 1 > /proc/sys/net/ipv4/ip_forward
    Now save this rc.nat in /etc/rc.d/ and make it executable by

    Code:
        
    chmod 755 /etc/rc.d/rc.nat
    Now add the following lines in your /etc/rc.d/rc.local so that every time you start your computer it get executed automatically.

    Code:
            /etc/rc.d/rc.nat
    Now in your clients make sure you have set the gatway as the ip of your computer which is connected directly to internet and also that you have entered right nameserver (DNS) in the dns list of clients.

    Now you should be able to share internet after executing this script.

    Source

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. sharing ideas
    By Skander94 in forum General Programming
    Replies: 4
    Last Post: 03-03-2011, 02:01 AM
  2. Replies: 2
    Last Post: 08-02-2010, 10:17 AM
  3. Sharing a Partition
    By BlaineSch in forum Computer Hardware
    Replies: 23
    Last Post: 08-03-2009, 07:30 AM
  4. Data sharing
    By denx in forum General Programming
    Replies: 8
    Last Post: 06-07-2008, 09:27 PM
  5. Sharing a drive
    By Pan in forum Linux Networking
    Replies: 2
    Last Post: 04-08-2008, 01:08 PM

Tags for this Thread

Bookmarks

Posting Permissions

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