Find the answer to your Linux question:
Results 1 to 4 of 4
for sharing my internet i found some scripts and mixed them together, now the problem is that when the client has booted while the win2k server is on everythings fine ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2003
    Posts
    22

    [rh8.0] losing ip-adress or not even sending one


    for sharing my internet i found some scripts and mixed them together, now the problem is that when the client has booted while the win2k server is on everythings fine even when i change to linux everything still works (msn, internet, email, ...) but when it boots while linux is on it doesn't get any ip??? when i ping the client there seems to be nothing wrong (the same when i ping the server from the client). the script i use is:

    #!/bin/sh
    IPTABLES=/sbin/iptables
    EXTIF="eth1"
    INTIF="eth0"
    echo " External Interface: $EXTIF"
    echo " Internal Interface: $INTIF"
    echo -en " loading modules: "

    echo " - Verifying that all kernel modules are ok"
    /sbin/depmod -a

    echo -en "ip_tables, "
    /sbin/insmod ip_tables
    echo -en "ip_conntrack, "
    /sbin/insmod ip_conntrack
    echo -en "ip_conntrack_ftp, "
    /sbin/insmod ip_conntrack_ftp
    echo -en "iptable_nat, "
    /sbin/insmod iptable_nat
    echo -en "ip_nat_ftp, "
    /sbin/insmod ip_nat_ftp
    echo " enabling forwarding.."
    echo "1" > /proc/sys/net/ipv4/ip_forward
    echo " enabling DynamicAddr.."
    echo "1" > /proc/sys/net/ipv4/ip_dynaddr
    echo " clearing any existing rules and setting default policy.."
    $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

    echo " FWD: Allow all connections OUT and only existing and related ones IN"
    $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

    echo " Enabling SNAT (MASQUERADE) functionality on $EXTIF"
    $IPTABLES -t nat -A POSTROUTING -o $EXTIF -j MASQUERADE


    oh, and i forgot to mention the ip's
    server: 192.168.0.1 and subnetmask 255.255.255.0
    client: 192.168.0.2 and the same subnetmask

    hope someone finds the mistake because it's really starting to bug me

    thanx hehe

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    How do you mean that it doesn't get an IP addr? Both computers already have one (192.168.0.[12]), right? Which computer is it that gets into trouble, the server or the client?

  3. #3
    Just Joined!
    Join Date
    Jan 2003
    Posts
    22
    Quote Originally Posted by Dolda2000
    How do you mean that it doesn't get an IP addr? Both computers already have one (192.168.0.[12]), right? Which computer is it that gets into trouble, the server or the client?
    the client ... it looses its connection and nothing works anymore! forgot to mention that DHCP aint installed so it shouldn't be part of the problem ...

  4. #4
    Just Joined!
    Join Date
    Jan 2003
    Posts
    22
    just to let you guys know and maybe for people who try the search and hook up with this topic. i found the answer ... i forgot to add the dns servers from my ISP to the DNS list in the TCP/IP section of the network configuration ... so that's the stupid mistake i made hehehe ...

Posting Permissions

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