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