Results 1 to 9 of 9
Hello,
I have 2 laptops connected by a lan cable - from 1 laptop network card to the other.
the first laptop is an Asus eeePc that runs a modified ...
- 06-23-2010 #1Just Joined!
- Join Date
- Jun 2010
- Posts
- 1
Simple Networking Problem
Hello,
I have 2 laptops connected by a lan cable - from 1 laptop network card to the other.
the first laptop is an Asus eeePc that runs a modified version of debian.
this one is connected to the internet and i simply want the other one to connect to the internet via the lan cable.
--------------------------------------------------
the "server" has 2 connections:
1. one for connecting to the internet via a dialup mobile connection (i checked and this connection is shared)
2. the 2nd connection: "Local Area Connection" defined this way:
IP address: 192.168.0.4
subnet mask: 255.255.255.0
+ it is also marked as 'shared'
that's all, no Gateway/DNS/Wins defined
--------------------------------------------------
the "client" (Debian 5.0 Lenny) has its own "Wired connection" defined this way:
Configuration: Static IP address
ip addreess: 192.168.0.3
subnet mask: 255.255.255.0
Gateway: 192.168.0.4
--------------------------------------------------
my problem is that the client (192.168.0.3) cannot open web pages even if it sees just fine the server's files.
please let me know what can i do to fix this.
thanks,
Andy
- 06-23-2010 #2
On the server turn FORWARD'ing on if the client is to use this as it's gateway to the internet. Traffic is not allowed to pass through the server if it is not setup o forward the traffic. Make sure you have a good firewall setup.
- 06-24-2010 #3
Forwarding per se is not going to do it. You'll need NAT set up on the server. Easiest way for you is likely to be installing Firestarter, although some iptables gurus here may tell you how to do it manually.
- 06-24-2010 #4Just Joined!
- Join Date
- May 2009
- Location
- Western USA
- Posts
- 2
Also (used to be) if you connected Nic to Nic.. you would need a crossover cable...
- 06-24-2010 #5Just Joined!
- Join Date
- Feb 2009
- Posts
- 22
I also had similar issue, solved it by following these steps:
1. Enable IP-forwarding on the server machine
there is 1 sysclt command to do it this wayecho 1 > /proc/sys/net/ipv4/ip_forward
2. Enable Source NAT'in of the out going packets. Assuming your eth0 is connected to Internet.sysctl -w net.ipv4.ip_forward=1
here x.x.x.x is the IP assigned to interface eth0.iptables -A POSTROUTING -t nat -o eth0 -j SNAT --to-source <x.x.x.x>
3. After applying step 2. your packets will reach the destination and back to your eth0 but you have to Make sure that the packets are not blocked by the firewall while transiting back from eth0 to eth1 (assuming this is connected to your client machine).
This should make your packets finally reach your LAN host i.e the client machine. Incase they don't just keep sniffers like wireshark/tcpdump ready on server machine and you can easily figure out at what point they are getting blocked by the firewall.iptables -I FORWARD -t filter -i eth0 -o eth1 -j ACCEPT
In case you have any issues, do post the output of sniffer.
- 06-24-2010 #6
If you are using the asus as the server and it's running the xandros distribution it shipped with, your going to have some fun with IP Tables! The kernel doesn't support them, however you can install kernel support/IP tables by following the guide in the wiki on eeuser.com you can find the link in the security section....
(I'm not allowed to post links yet)
- 06-24-2010 #7Just Joined!
- Join Date
- Feb 2009
- Posts
- 22
- 06-24-2010 #8
- 06-24-2010 #9Just Joined!
- Join Date
- Mar 2003
- Location
- CT
- Posts
- 7
Can you post a rough diagram of your network setup, I am having a hard time visualizing it it would go a long way to seeing If I can help. It might assist others in assisting you too.


Reply With Quote
