Internet Share

Discussion in 'Installation/Configuration' started by dphreak, Feb 4, 2008.

  1. dphreak

    dphreak New Member

    Please i need help configuring Fedora 8 system with two network interfaces to eth0 and eth1 .My other pc is connected to eth1 but i dont know how to share internet to it.I use rpmpppoe to conect via eth0 on internet on demand. If someone is so nice to leed me step by step i would be greatful. Thanx in advance !
     
  2. topdog

    topdog Active Member HowtoForge Supporter

    Okay this is a quick and dirty guide, am sure there are more comprehensive ones you can get on the net

    Enable forwarding edit /etc/sysctl.conf and make this change
    Code:
    net.ipv4.ip_forward = 1
    
    Create a quick firewall to block internet users from getting to you and to NAT you lan connections out, edit /etc/sysconfig/iptables
    Code:
    *raw
    :PREROUTING ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    COMMIT
    
    *nat
    :PREROUTING ACCEPT [0:0]
    :POSTROUTING ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    -A POSTROUTING -o ppp+ -J MASQUERADE
    COMMIT
    
    *mangle
    :PREROUTING ACCEPT [0:0]
    :INPUT ACCEPT [0:0]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [0:0]
    :POSTROUTING ACCEPT [0:0]
    COMMIT
    
    *filter
    :FORWARD DROP [0:0]
    :INPUT DROP [0:0]
    :OUTPUT DROP [0:0]
    -A INPUT -i lo -j ACCEPT
    -A INPUT -i eth1 -j ACCEPT
    -A INPUT -i ppp+ -m state --state ESTABLISHED,RELATED -J ACCEPT
    -A FORWARD -i eth1 -o ppp+ -j ACCEPT
    -A FORWARD -i ppp+ -o eth1 -m state --state ESTABLISHED,RELATED -J ACCEPT
    -A OUTPUT -J ACCEPT
    COMMIT
    
     
  3. dphreak

    dphreak New Member

    thanx for guide i will try and see is it working
     
  4. dphreak

    dphreak New Member

    i make it exactly as you discrybe but nothing works :(
     
  5. topdog

    topdog Active Member HowtoForge Supporter

    Did you reboot ?
    What does this show
    Code:
    cat /proc/sys/net/ipv4/ip_forward
    
     

Share This Page