Sharing internet with windows box ?
How to share internet with windows machine ?
|
How would this be set up? Will the Windows machine have a direct connection and the Linux box will share it or vice versa? Or both going through a router?
|
Your question is unclear. What do you want to do exactly ?
If you want to use windows machine to share internet, why are you in a linux forum ? |
I want to install linux on one computer in enternet cafe that all of his machine works on windows ... I dont no if it is a direct connection or through a router but it is probably through a router
|
Do you want to log the activity ? If so, you'll have to use a proxy, if you don't want to log the activity, you can use NAT (Network Address Translation) using iptables. There is a lot of tutorial and thread on this forum to help you.
|
use masquerading ...
if connection is on linux box .. u wil have to enable packet forwarding which is NAT ... run this as root modprobe ipt_MASQUERADE iptables -F iptables -t nat -F iptables -t mangle -F iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to <ip of ur ethernet connected to internet> echo 1 > /proc/sys/net/ipv4/ip_forward iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT iptables -P INPUT DROP #only if the first two are succesful iptables -A FORWARD -i eth0 -o eth0 -j REJECT here i assume that eth0 is ur interface connected to internet |
and then on windows machine ... change ur gateway ip to that of linux machine ... and change dns to one of the entries of /etc/resolv.conf
and then try accessing internet ... shud work and if it does not then try nslookup www.google.com from dos and if it say time out .. then check ur dns ... it shud be the same server as in ur /etc/resolv.conf all the best any problem then post back |
if u have a dialup connection on linux box ... then replace eth0 with ppp0
and also change the 5 command as iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE all the best |
While where on this topic about DNS,
do you have to build your own DNS server on the linux box ( the one sharing your internet connection using NAT) or can you use the DNS server that your dialup modem is connected to? |
i think .. i did mention to use the entries of /etc/resolv.conf which will contain entries of ur dialup connection ..
yehh u will have to mention the dns address which ur external interface use .. in ur case dialup.... |
why on earth u wud need to create ur own dns server !! sharing internet is not tht cumbersome ..
all the best trojen ..post back .. if any more problem |
just thought DNS would work better on your own server. but i managed to get it working using the Dialups DNS.
thanks for that. |
All times are GMT -5. The time now is 05:26 PM. |