Windows to net through linux box
I have 2 computers, one with debian, one with xp. I've managed to get windows to internet through debian box but not anymore. Settings are:
Windows box ip: 192.168.0.2
Debian box ip: 192.168.0.1
I can connect putty to debian but nothing else works. So how do I connect my windows box to net?
Having similar problems.
I've came across the same problem. Though i have dug a little deeper.
I can ping from linux to windows just fine aka
PING 192.168.0.137 (192.168.0.137) 56(84) bytes of data.
64 bytes from 192.168.0.137: icmp_seq=1 ttl=128 time=0.236 ms
64 bytes from 192.168.0.137: icmp_seq=2 ttl=128 time=0.237 ms
64 bytes from 192.168.0.137: icmp_seq=3 ttl=128 time=0.229 ms
64 bytes from 192.168.0.137: icmp_seq=4 ttl=128 time=0.244 ms
--- 192.168.0.137 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3013ms
rtt min/avg/max/mdev = 0.229/0.236/0.244/0.016 ms
But if i try to ping from the windows box ::192.168.0.137::
to my linux box ::192.168.0.1:: i get nada. Zero. Zilch.
i can get Smb4K to connect to the windows machine just fine, and i can browse all the shares on the windows machine just fine with full access(i can write to files, add files, and delete files).
See if your windows box can ping your linux box. And if so, your closer to resolving your problem than i am mine.
also, if you CAN ping your linux box from your windows box, try adding
net.ipv4.ip_forward = 1
Maby this will help you resolve your problem. .. And if anyone has any suggestions on mine, Thnx in advance!
Well, first I would try the easy route.. which is get programs that do all the hard iptables configuring work for you.
-FireStarter is an automatic internet connection sharing application that is very simple to setup and run, just choose your internet-able interface and the interface you wish to setup as a gateway. You may also want a DHCP daemon, as it just makes life easy. To manually configure it do the following:
*if you do get FireStarter, which i would recommend, make SURE you disable the firewall it comes with that is enabled by default, it's useless in your scenario anyways
sysctl -w net.ipv4.ip_forward=1
net.ipv4.ip_forward = 1
iptables -t nat -A POSTROUTING -o XXX -j MASQUERADE
*XXX is the adapter connected to the router/internet ex. eth0,eth1,etc*
Then configure both of them with the same subnet mask (255.255.255.0) but make sure they are on DIFFERENT SUBNETS.
ALL Ethernet adapters (eth0, eth1) must be configured with the routers IP address as the default gateway, if you want lookups to work.
To recap, the router and the pc sharing the internet, need to be on the same subnet and network. (192.168.1.1 & 192.168.1.2)
The ethernet card going to your second machine, needs to be on the same subnet and network as the NIC in the second machine. (192.168.2.1 & 192.168.2.2)
Hopefully that helps.
Ok, i got it.
I don't know about you, But i wasn't able to get firestarter working on my distro, im using a 2.6.x.x kernal, and the last stable firestarter was for like, 2.4.x.x kernals. I did have to install a firewall gui though, because when i installed my os the installer automaticly set up the kernal's built in shorewall, and obviously i had to reconfigure firewall rules for the internal network trying to reach the internet(and im not famillar with iptables enough to do it manually). I personally used GuardDog, and set my net.ipv4.ip_forwarding = 1 on the first line in /etc/sysctl.conf, Set my eth0 to 192.168.0.1 subnet mask 255.255.255.0 and default gateway 192.168.0.1, then i rebooted the machine i opened up guard dog and crated a new "zone" called LAN with the ip range of 192.168.0.0\24 (you can also use 192.168.0.0\255.255.255.0) and enabled all clients from LAN to be able to reach services on the Internet zone. Went to the windows box and set 192.168.0.1 as the default gateway, and presto, Google could be pulled up, and Yahoo Messenger logged right online. Hope this helps you out.
also , if your using dialup as the internet connection and using the martian modem packages, you can
sudo rm /dev/modem
sudo ln -s /dev/ttySM0 /dev/modem
and get a graphical dial up utility like KPPP to work by manually selecting the modem,
and pointing it to /dev/modem (for some reason i coulden't get /dev/ttySM0 to show up *shruggs)
Anyways, Good Luck. And hope I've managed to help you out some!
What can go wrong? :confused:
I've used this all time since my last post everyday my windows box in the net succesfully. But now I rebooted my windows and after that it doesn't get connection to linux box. Only connection timed out when I ping or try to use putty. I've booted my windows many times before and everything has worked perfectly so far. From linux I can ping my windows succesfully though. So what migh be the problem?
|All times are GMT -5. The time now is 10:42 AM.|