Linux - NetworkingThis 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.
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.