Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, I am not an expert user of Linux and I did my home work before posting this thread. Situation: 1. T61p laptop running Redhat is connected to Internet using ...
  1. #1
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2

    Internet Connection Sharing between Redhat and Windows XP

    Hi,

    I am not an expert user of Linux and I did my home work before posting this thread.

    Situation:

    1. T61p laptop running Redhat is connected to Internet using wlan0 with gateway address of my router 192.168.100.101

    2. T60p laptop running Windows XP is connected to eth0 of Linux laptop through a normal ethernet cable (Not crossover cable).

    3. I am trying to do internet connection sharing on Windows XP through Linux laptop and I got partial success after reading many posts.

    This is what I did:

    1. Installed dnsmasq on Linux and added these 2 lines in /etc/dnsmasq.conf file.

    interface=eth0
    dhcp-range=eth0,192.168.200.15,192.168.200.20,255.255.2 55.0,12h

    2. Created a script 'crossover' as follows:


    ifconfig eth0 down
    ifconfig eth0 192.168.200.150
    echo "1" > /proc/sys/net/ipv4/ip_forward
    iptables -t nat -A POSTROUTING -o wlan0 -J MASQUERADE
    service dnsmasq restart
    ifconfig eth0 192.168.200.150 up
    iptables -t nat -A POSTROUTING -o wlan0 -J MASQUERADE

    3. Made sure that my wireless is turned off on my XP laptop

    4. Turn off iptables on Linux laptop.

    # service iptables stop

    5. Connected a normal ethernet cable between 2 laptops

    6. Release IP in windows "ipconfig /release"

    7. Ran 'crossover' script on Linux laptop

    8. Windows XP picked up the IP address and I am able to connect to Internet.

    So far so good but the moment, I turn-on my iptables, XP can not get IP address from my Linux laptop.

    I used this command in my 'crossover' script to open port 53 but that did not also help.

    iptables -A INPUT -p tcp -m state --state NEW -m tcp --dport 53 -j ACCEPT

    It looks that dnsmasq opens some other ports which are getting blocked by the iptables and I could not get a solution to this after going through many posts and that is why looking for help from you experts.

    I appreciate your help. I need a direct connection from T60p to T61p to get 1 gbps network since my router is still 100 mbps and I needed a high speed connection between both laptop to do some benchmark testing and I also needed access to the internet. I can not afford to turn off firewalls as that will be put me in security violation.

    Thanks

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,114
    So far so good but the moment, I turn-on my iptables, XP can not get IP address from my Linux laptop.
    Since the script is setting your iptables rules, why do you need
    to turn it on again?

  3. #3
    Just Joined!
    Join Date
    Apr 2009
    Posts
    2
    If iptables is running and even though it is allowing port 53, I can not get this working. This only works when I stop the iptables service. My guess is that dnsmasq is also using ports other than 53 and I do not know how to account for that.

Posting Permissions

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