Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I know this issue is frequently spoken but I am just stuck here. I am trying to connect my xp box through my fedora 1 box to the internet. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2004
    Posts
    18

    can't share the internet


    Hi,
    I know this issue is frequently spoken but I am just stuck here.
    I am trying to connect my xp box through my fedora 1 box to the internet.

    this is what I did:
    my fedora box is set on 192.168.1.1
    and my xp box is on 192.168.1.3
    eth1 connects me to the internet
    while eth0 to the local network.

    in the file /etc/rc.d/rc.local I added the following line:
    Code:
    /etc/rc.d/rc.firewall
    then I created the file rc.firewall in the correct directory and edited it as followed:
    Code:
    IPTABLES=/sbin/iptables 
    EXTIF=eth1
    INTIF=eth0 
    
    /sbin/insmod ip_tables
    /sbin/insmod ip_conntrack
    /sbin/insmod ip_conntrack_ftp
    /sbin/insmod ip_conntrack_irc
    /sbin/insmod iptable_nat
    /sbin/insmod ip_nat_ftp
    /sbin/insmod ipt_mark
    /sbin/insmod ipt_tcpmss
    /sbin/insmod ipt_limit
    /sbin/insmod ipt_multiport
    /sbin/insmod ipt_state
    /sbin/insmod ipt_unclean
    /sbin/insmod iptable_filter
    /sbin/insmod iptable_mangle
    
    echo "1" > /proc/sys/net/ipv4/ip_forward 
    
    $IPTABLES -P INPUT ACCEPT
    $IPTABLES -F INPUT
    $IPTABLES -P OUTPUT ACCEPT
    $IPTABLES -F OUTPUT
    $IPTABLES -P FORWARD DROP
    $IPTABLES -F FORWARD
    $IPTABLES -t nat -F 
    
    $IPTABLES -A FORWARD -i $EXTIF -o $INTIF -m state --state ESTABLISHED,RELATED -j ACCEPT
    $IPTABLES -A FORWARD -i $INTIF -o $EXTIF -j ACCEPT
    $IPTABLES -A FORWARD -j LOG 
    
    $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE
    after running the file and rebooting my xp box I could get pings from my XP box to my fedora box and vice versa.
    but my XP box still can't access the internet.

    Any help will be appreciated.
    Shlomi

  2. #2
    Just Joined!
    Join Date
    Jun 2004
    Location
    Leiria - Portugal
    Posts
    72

    wat about default gateway?

    Wat is the default gateway ip address on your xp?

    It must be the ip address of your fedora eth0.

    and the fedora must be forwarding ipv4 packets.

    You also have to play atention to the dns configuration. Running a DNS server at fedora system tends to minimize the trafic needs, and the DNS queries might be faster.

    http://mirror.ipv.pt/LDP/HOWTO/Netwo...O-8.html#ss8.3

    Post more about your config, and errors too.

    See you...

  3. #3
    Just Joined!
    Join Date
    Apr 2004
    Posts
    18
    Thank you for your help.
    that guide contained many info I did not know.
    but I got it figured. the mistake I was doing was setting EXTIF to eth1 instead of ppp0 due to the fact I have an ADSL connection.
    the guide I was using did not mention that it could be a problem...

    so many thanks.

  4. $spacer_open
    $spacer_close

Posting Permissions

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