Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-03-2007, 07:22 AM
|
#1
|
|
Member
Registered: Oct 2005
Location: Finland, Tampere
Distribution: Debian
Posts: 47
Rep:
|
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?
|
|
|
|
11-03-2007, 10:38 PM
|
#2
|
|
LQ Newbie
Registered: Nov 2006
Posts: 27
Rep:
|
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
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.
However
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
to /etc/sysctl.conf
Maby this will help you resolve your problem. .. And if anyone has any suggestions on mine, Thnx in advance!
|
|
|
|
11-03-2007, 10:50 PM
|
#3
|
|
LQ Newbie
Registered: Nov 2007
Location: Murder mitten
Posts: 13
Rep:
|
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.
Last edited by edclancy7715; 11-03-2007 at 11:08 PM.
|
|
|
|
11-04-2007, 05:14 PM
|
#4
|
|
LQ Newbie
Registered: Nov 2006
Posts: 27
Rep:
|
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.
|
|
|
|
11-04-2007, 05:19 PM
|
#5
|
|
LQ Newbie
Registered: Nov 2006
Posts: 27
Rep:
|
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!
|
|
|
|
11-05-2007, 03:52 AM
|
#6
|
|
Member
Registered: Oct 2005
Location: Finland, Tampere
Distribution: Debian
Posts: 47
Original Poster
Rep:
|
Quote:
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*
|
This worked fine with me! Thanks alot!
|
|
|
|
11-05-2007, 09:39 AM
|
#7
|
|
LQ Newbie
Registered: Nov 2007
Location: Murder mitten
Posts: 13
Rep:
|
Quote:
Originally Posted by hate29
This worked fine with me! Thanks alot!
|
NP glad you got it working 
|
|
|
|
11-13-2007, 01:17 PM
|
#8
|
|
Member
Registered: Oct 2005
Location: Finland, Tampere
Distribution: Debian
Posts: 47
Original Poster
Rep:
|
What can go wrong?
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?
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:49 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|