Re: Howto Share internet connection
By following your instructions (after a long while spent at the ages-old art of trial-and-error ;) I got as far as this:
eth0 connects me to the Internet.
eth2 connects me to my winxp machine.
ping gets reply both ways and my winxp is hosting ftp server which is reachable.
winxp firewall is disabled (just in case)
Xp machine, however, does NOT reach Internet. Possible reason for this could be in the way I've set up the xp machine's networking. You did not give specifics as to how those should be set up, but I've tested both fixed ip and DHCP. Also, the networking adapters and cables im using are reliable... Any ideas?
-Squirreli
PS. I do have a slight virus problem on the XP machine's lsass.exe, but it connects to Internet just fine when there's no linux box between it and the Internet, so I don't believe that to be the trouble.
Re: Howto Share internet connection
Hello,
On your winxp machine configure it with a static ip (make it similar to the ip on your server. eg if server ip is 192.168.0.1, then make your ip 192.168.0.10). Also make sure that you set the "Default Gateway" and "Preffered DNS" to the ip on your ubuntu machine (the one that's sharing the internet connection). It should work fine after that.
Good luck
Re: Howto Share internet connection
Ha! Now it works.
Setting default gateway didn't help, but didn't do any harm either. Setting preferred DNS server did the trick... So, these XP comp tcp/ip settings made it work.
-fixed ip:192.168.0.1 (subnet mask 255.255.255.0)
-default gateway:192.168.0.2
-preferred DNS server:192.168.0.2
Paljon kiitoksia/Thank you very much ;)
-Squirreli
Re: Howto Share internet connection
No worries. I'm glad it has helped!
Re: Howto Share internet connection
I'm having some fun with this -
set up is a PPC laptop that needs the internet from a x86 desktop (which gets the internet with ath0 , a wifi adapter, and is sharing with eth0), both running Breezy. Is it a matter of just changing Network settings?
So far, the laptop can ping x86 when static IP and DNS is set to the x86 IP (192.168.0.2), but cant get to the internet. Also x86 cant get to the internet while eth0 is activated .
Should I also change submasks?
PLUS when I restart dnsmasq I get :
Restarting DNS forwarder and DHCP server: dnsmasqstart-stop-daemon: warning: failed to kill 8006: Operation not permitted
rm: cannot remove `/var/run/dnsmasq.pid': Permission denied
dnsmasq: failed to bind listening socket: Permission denied
(failed to start).
I'm also using a crossover cable - thats right isnt it?
Re: Howto Share internet connection
Hello nicholaspaul,
Make sure that the subnet masks on your ppc are set to 255.255.255.0.
Also make sure that the Default Gateway on the ppc is set to the ip of the x86 (192.168.0.2)
About restarting dnsmasq, are you sure you are executing the command as root user?
Re: Howto Share internet connection
Hi anaoum
Yea... :( tried all that. x86 still can't get to the internet unless I deactivate eth0 even tho ath0 is the default gateway device.
So the full story is:
x86
ath0:
Static IP: 192.168.0.102
Subnet: 255.255.255.0
Gateway Address: 192.168.0.1 [the address of my wireless router]
eth0:
Static IP: 192.168.0.2
Subnet: 255.255.255.0
Gateway Address: 192.168.0.1
Default Gateway Device: ath0
PPC Laptop
eth0:
Static IP: 192.168.0.2
Subnet: 255.255.255.0
Gateway Address: 192.168.0.2
DNS: 192.168.0.102
Search domain: home (the name of the intranet)
---------------------------------------------------
Should I change search domains on the PPC?
Re: Howto Share internet connection
Quote:
Originally Posted by anaoum
2. Then configure the NAT as follows:
# iptables -t nat -A POSTROUTING -o ethX -j MASQUERADE
where ethX is the network card that the Internet is coming from
# echo 1 > /proc/sys/net/ipv4/ip_forward
Oh wait a minute - should ethX be the interface that gets x86 the internet, or the one I'm sharing with?
Re: Howto Share internet connection
The Firestarter firewall can do all of this for you, by the way...
Code:
sudo apt-get install firestarter
Its just a frontend to iptables.
In its preferences, set "internet connected device" to the internet, and "local network device" to the local device. Then enable NAT and DHCP if you want...