Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Internet Connection Sharing debian > Windows xp

New to Debian (Or Linux in general)? Ask your questions here!
Message
Author
User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Internet Connection Sharing debian > Windows xp

#1 Post by szarki432 »

Hello

I installed modem Sagem fast 800 on debian .. and i want share internet connection with windows xp
Before this (masquerade) everything worked fine on debian (internet worked)

I say step by step what i done ..

on windows xp i set NIC like this:

Code: Select all

IP Address: 192.168.0.2
Netmask: 255.255.255.0
Gateway: 192.168.0.1
DNS1: 192.168.0.1
DNS2: 212.160.68.2
Debian NIC:

Code: Select all

IP Address: 192.168.0.1
Netmask: 255.255.255.0
Gateway: 192.168.0.1
Next i run those commands:

Code: Select all

ifconfig eth0 192.168.0.1
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
apt-get install dnsmasq ipmasq
/etc/init.d/dnsmasq restart
dpkg-reconfigure ipmasq
I uncomment this line in /etc/sysctl.conf :

Code: Select all

net.ipv4.ip_forward=1 
I figured out that i will have to run those commands after every reboot (to have masquerade) :

Code: Select all

ifconfig eth0 192.168.0.1
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
So i decide create /etc/init.d/firewall

Code: Select all

echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
of course

Code: Select all

chmod +x /etc/init.d/firewall
update-rc.d firewall defaults 20
And to /etc/network/interfaces i added:

Code: Select all

auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1
After that i rebooted PC
My debian .. simply stoped for about couple of minutes on:

Code: Select all

Starting MTA:
After that i logged in as root
and i try ping something .. but nothing was pingged.
It shows up after ping try
"unknow ...."
i checked my internet connections and seems to be fine .. but not working :(
I try

Code: Select all

pppd call net24
and shows up:

Code: Select all

Plugin pppoatm.so loaded
but this plugin was allready loaded durring system booting.

ifconfig shows:

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:02:a5:35:83:f5 
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::202:a5ff:fe35:83f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:73 errors:0 dropped:0 overruns:0 frame:0
          TX packets:135 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:5586 (5.4 KiB)  TX bytes:5945 (5.8 KiB)

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:65 errors:0 dropped:0 overruns:0 frame:0
          TX packets:65 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5577 (5.4 KiB)  TX bytes:5577 (5.4 KiB)

ppp0      Link encap:Point-to-Point Protocol 
          inet addr:77.255.61.246  P-t-P:195.114.190.150  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:240 (240.0 B)  TX bytes:61 (61.0 B)
and, /etc/network/interfaces shows:

Code: Select all

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
gateway 192.168.0.1
Please, help me :cry:

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#2 Post by szarki432 »

I added new info

User avatar
Absent Minded
Posts: 3464
Joined: 2006-07-09 08:50
Location: Washington State U.S.A.
Been thanked: 3 times

Re: Internet Connection Sharing debian > Windows xp

#3 Post by Absent Minded »

Don't you have 2 nics in your computer for this? Also I noticed that you are not setting your gateway to your modem. What was the working configuration in your interfaces file before you changed it?
Serving the community the best way I can.
Spreading the tradition of Community Spirit.
Please read some Basic Forum Philosophy
Give a man a fish, he eats for a day. Teach him how to fish, he eats for life.
Updated Nov. 19, 2012

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#4 Post by szarki432 »

little misunderstanding
I have 1 nic in debian and 1 in windows xp

Everything was working (internet connection on debian) after instaling modem:
(Quick what i've done)

I downloaded http://eagle-usb.org/ueagle-atm/non-fre ... 1.1.tar.gz
and run commands

Code: Select all

tar xvzf ueagle-data-1.1.tar.gz
mv ueagle-data-1.1 ueagle-atm
mv ueagle-atm /lib/firmware/
apt-get install ppp
I created /etc/ppp/peers/net24

Code: Select all

lock
defaultroute
noipdefault
noauth
holdoff 4
maxfail 25
persist
asyncmap 0
lcp-echo-interval 2
lcp-echo-failure 7
name myid@provider.com
user myid@provider.com
plugin pppoatm.so
0.35
I created /etc/ppp/pap-secrets

Code: Select all

# Secrets for authentication using PAP
# client        server  secret                  IP addresses
"myid@provider.com" * "mypass" *
And after that my internet connection working

Code: Select all

pppd call net24
But when i've done that what is post in 1st post
internet connection stopped working.

Here is my resolv.conf

Code: Select all

nameserver 213.241.79.37
nameserver 213.241.79.38
and data from route command:

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
195.114.190.150 *               255.255.255.255 UH    0      0        0 ppp0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.0.1     0.0.0.0         UG    0      0        0 eth0
I don't know why i have double eth0
btw. I suppose that i should put IP address of second nic (192.168.0.2) in Destination.
But i don't know how to do it , and if that will be good .. to do that.

User avatar
Absent Minded
Posts: 3464
Joined: 2006-07-09 08:50
Location: Washington State U.S.A.
Been thanked: 3 times

Re: Internet Connection Sharing debian > Windows xp

#5 Post by Absent Minded »

okay, i think I need more info, How is your modem connected? USB? I would have thought hat there should have been an entry in /etc/network/interfaes that showed your modem connection. Anyway, it looks to me like you machine is just going around in a circle as I don't see a gatway to the internet. As for needing to put anything in for WinXP's nic you shouldn't have to do that. The way I understand dnsmask WinXP should be set to get a DHCP address from your Debian box. anyway, I "think" you need an entry in your interfaces file for your modem.
Serving the community the best way I can.
Spreading the tradition of Community Spirit.
Please read some Basic Forum Philosophy
Give a man a fish, he eats for a day. Teach him how to fish, he eats for life.
Updated Nov. 19, 2012

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#6 Post by szarki432 »

My modem is Sagem F@st 800 it's using USB port.

i think too that i shoul put something to /etc/network/interfaes
but i don't know exactly what
Like u see my modem using ppp0
and has dynamic ip (changing every time after re-connect)

I almost sure that i set all good in win xp (NIC)

I don't have have dhcp installed on debian .. and it will be problem to install it since i don't have internet connection on debian.

btw.
you mean
apt-get install dhcp
or
apt-get install dhcp3-server

Coz i tried install dhcp3-server before and there was a problem durring loading this thing (exactly durring system bootting)

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Internet Connection Sharing debian > Windows xp

#7 Post by smallchange »

Your XP settings are correct. Remove the gateway line from /etc/network/interfaces. That establishes a default route to your internal network when you want the default route to be through your modem. The default route is through the gateway, so if the host is not found on your local network that is where it goes to find it. You should have an entry in /etc/hosts that associates your XP address, 192.168.0.2, with that machine and it will be found because it is on your local subnet. Then, because your ppp command includes "defaultroute" when ppp comes up that defaultroute is added.

Summary:
/etc/network/interfaces looks like this
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
Then run

Code: Select all

ifdown eth0 && ifup eth0
Edit: I changed the ) to the 0 it needed to be above.

Then bring up your ppp interface and it should work. As for the enabling of forwarding leave this
net.ipv4.ip_forward=1
in /etc/sysctl.conf and all the echoing business is not needed.
Last edited by smallchange on 2010-02-10 21:16, edited 1 time in total.

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#8 Post by szarki432 »

You meant

Code: Select all

net.ipv4.ip_forward=1 
or

Code: Select all

#net.ipv4.ip_forward=1 
because i have allready uncomment this line (so it's "on")

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Internet Connection Sharing debian > Windows xp

#9 Post by smallchange »

I mean leave net.ipv4.ip_forward=1 uncommented.

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#10 Post by szarki432 »

It's working now :D
masquerade and net connection on debian working perfectly
many thanks :wink:

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#11 Post by szarki432 »

Hi again :wink:

I have another problem with some web pages
They do not work after masqerade (when usb modem is connected to pc with debian)

Those web pages starting to work when i connect my modem directly to pc with windows xp

One person told me that i should put this:

Code: Select all

echo 0 > /proc/sys/net/ipv4/tcp_window_scaling
to /etc/init.d/firewall
But this not helped (I reboot pc with debian to see those changes)

Please help me :roll:

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Internet Connection Sharing debian > Windows xp

#12 Post by smallchange »

To be of any help we will need to know more about the links that are giving you trouble. Can you point us to one?

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#13 Post by szarki432 »

Ok

For example this:
http://debian.linux.pl/

This is polish support for debian

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Internet Connection Sharing debian > Windows xp

#14 Post by smallchange »

I don't see any obvious problem. I can't read any of it but it appears to be complete and in place when I look at it. The page is largely javascript. I have not heard any problems with javascript through NAT. Maybe someone else here has some ideas?

What do you see when it has trouble?

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#15 Post by szarki432 »

That page (debian.linux.pl)

Is loading, and loading .. so on so on
I waited abou 5 min to Firefox finish loading in page (i not touch FF when he was doing it) and nothing loaded (not a single element)

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#16 Post by szarki432 »

I found this article:

7.15. ( MTU ) - IP MASQ seems to be working fine but some sites don't work. This usually happens with WWW and some FTP sites

This this step (i think) should work:
7.15.4. Changing the MTU of various operating systems

But there is no solution to Windows XP (only win95, 98, 2000)

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Internet Connection Sharing debian > Windows xp

#17 Post by smallchange »

Interesting. I have never run into that before and that link is from 2005. Do you know that your ppp connection uses a small MTU? You can set the MTU on your eth0 interface in Debian by putting a line in your /etc/network/interfaces file. Something like MTU 1412 in the eth0 portion should do this. It would almost certainly cause the other hardware to comply with this.

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#18 Post by szarki432 »

This is my ppp0 from ifconfig

Code: Select all

ppp0      Link encap:Point-to-Point Protocol
          inet addr:87.205.248.7  P-t-P:195.114.190.150  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1492  Metric:1
          RX packets:51 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3
          RX bytes:8157 (7.9 KiB)  TX bytes:8687 (8.4 KiB)
and eth0

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:02:a5:35:83:f5
          inet addr:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::202:a5ff:fe35:83f5/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:532 errors:0 dropped:0 overruns:0 frame:0
          TX packets:675 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:67491 (65.9 KiB)  TX bytes:127555 (124.5 KiB)
So i need to change MTU in eth0 on 1492 ?
I don't know how to do that in that article which i post before, i don't see instrucions for debian (only Slackware and redhat)

smallchange
Posts: 1740
Joined: 2009-05-04 15:56
Been thanked: 1 time

Re: Internet Connection Sharing debian > Windows xp

#19 Post by smallchange »

Edit /etc/network/interfaces to look like this. Then down eth0 and bring it back up. Run ifconfig again and it should show an mtu of 1492. If you can still talk to your Windows machine you should be set. If not down the interface on windows and bring it back up. If ethernet does it's stuff right they should agree.
auto eth0
iface eth0 inet static
address 192.168.0.1
netmask 255.255.255.0
mtu 1492

User avatar
szarki432
Posts: 18
Joined: 2010-02-08 20:20

Re: Internet Connection Sharing debian > Windows xp

#20 Post by szarki432 »

Solved :wink:

I used MTU Tool (windows XP) to change mtu value from 1500 to 1492 :wink:

Post Reply