Find the answer to your Linux question:
Results 1 to 2 of 2
I have two computers, my linux box (host) and my Win98 box (client). I wish to enable IP MASQ, I had this working last night and the client was able ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    8

    IP MASQ just stopped working and iptables dead


    I have two computers, my linux box (host) and my Win98 box (client). I wish to enable IP MASQ, I had this working last night and the client was able to access the Internet, however today it just does not work. I notice in my services that iptables has stoped, and I cannot start it.

    linux: (Mandrake 9.2) both adaptors eth0 and eth1 are reported to be working. I can ping the client (192.168.0.162) with 0% loss. Client can ping host (192.168.0.1) with 0% loss.

    client has a ipconfig of:

    ip: 192.168.0.162
    subnet: 255.255.255.0
    gateway: 192.168.0.1 <-- my linux box eth0 configed for static

    eth0 is conected to the client, and eth1 is conected to the internet (dhcp)

    ifconfig in linux:

    eth0 Link encap:Ethernet HWaddr 00:40:F4:43:3E:BD
    inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:59 errors:0 dropped:0 overruns:0 frame:0
    TX packets:76 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:100
    RX bytes:5827 (5.6 Kb) TX bytes:11292 (11.0 Kb)
    Interrupt:10 Base address:0x5000

    eth1 Link encap:Ethernet HWaddr 00:80:C6:FE:15:A9
    inet addr:24.101.x.x Bcast:24.101.x.x Mask:255.255.252.0
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:2828 errors:0 dropped:0 overruns:0 frame:0
    TX packets:2865 errors:0 dropped:0 overruns:0 carrier:0
    collisions:2 txqueuelen:100
    RX bytes:2050907 (1.9 Mb) TX bytes:420707 (410.8 Kb)
    Interrupt:11 Base address:0xc000

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:178 errors:0 dropped:0 overruns:0 frame:0
    TX packets:178 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:13668 (13.3 Kb) TX bytes:13668 (13.3 Kb)

    I have a /etc/rc.d/rc.ipmasq with the following:

    #!/bin/sh

    IPTABLES=/sbin/iptables
    $IPTABLES -F -t nat
    $IPTABLES -A POSTROUTING -t nat -o eth1 -j MASQUERADE
    echo 1 > /proc/sys/net/ipv4/ip_forward

    My bigest concern is that after discovereing the client nolonger has internet, I began looking on forms and typed the following commands:

    /sbin/iptables -P INPUT DROP
    /sbin/iptables -P FORWARD DROP
    /sbin/iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    /sbin/iptables -A INPUT -i eth0 -j ACCEPT
    /sbin/iptables -A FORWARD -i eth0 -j ACCEPT

    I have no clue what they do other then modify the iptables, Is it possible this caused the iptables service to not work anymore? iptables is checked to start on boot, but when I look at my services it is stoped and I can't start it.

    Can someone please help me configure IP Masquerading to work again so mom can get internet again and so that I don't have to die?

    I'm a newbie.

  2. #2
    Just Joined!
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    8

    Update

    Ok looks like I have solved the problem somehow. I went into the Controll Center that comes with Mandrake, into the Network and Internet settings and used a GUI called DrakeGW for configureing Internet Shareing.

    In there I said I wanted to reconfigure, and I went through the steps and viola!

    I went over to the client machine (9 and it works, Internet is back,

    I would like to understand what it did to fix the problem so if anyone knows a newbie friendly article about IP MASQ and iptables maybe you could give a link since google isnt giveing me very newbie friendly articles.

Posting Permissions

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