Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Can you be more specific? Like a server on a local network, or a server on the internet? And which servers are you specifically looking for? FTP, HTTP, DNS, DHCP, NTP, Samba, SSH, Telnet, etc?
For a router, (i think same as gateway), you simply have to enable IP Forwarding:
Code:
echo "1" > /proc/sys/net/ipv4/ip_forward
then you have to either set up your DHCP server to point to your linux machine as the gateway, or you have to manually set it up on your windows machine.
And you should also look into iptables, a firewall, to prevent tons of hackers accessing your computer.
Oh ya, you need 2 ethernet connectors on your linux machine, one that directly connects to the cable modem, and uses dhcp, and another that connects to your internal network, which has a manually set IP address and stuff, so that the comp. can forward packets from your internal network outside via cable modem. (i'm assuming you have cable, no clue what to do w/ dialup)
edit the file /etc/sysctl.conf and change the line that says:
net.ipv4.ip_forward = 0
to
net.ipv4.ip_forward = 1 # 1 turns on ip forwarding
your linux box will of course need 2 NICS, 1 to the XP box and 1 to the internet.
you'll have to give the XP box an ip address that is on the same network as the network card it connects to on the Linux box:
if the Linux box is connected to the XP box on eth1 then do this on the Linux box:
and on the XP box you'll have to go into Control Panel, Network Connections and go to Local Area Connection (right click on the icon and go to properties)
In the properties window, highlight the line that says Internet Protocol (TCP/IP) and click the Properties button located below it.
In there u'll have to set the IP of the XP box to 192.168.1.X where X is any number from 2 - 254 inclusive (DO NOT USE 0, 1 or 255).
Mask: 255 255 255 0
Gateway: 192.168.1.1 (notice the gateway address is the same as eth1 on Linux box)
DNS servers u'll get from your ISP
now you should be able to ping back and forth between the 2 boxes provided you use a CROSSOVER cable.
on the linux box you'll have to setup NATing to use the internet on the XP box. Assuming you have iptables installed and working, the rule to use is:
if your ISP gives you a static ip address (one that never changes) then you can
cut down on the overhead a little by using SNAT over MASQUERADE, that rule
would look like this:
you'll have an insecure setup there so you'll want to learn more about iptables to setup a good strong firewall and many learn about DNAT if you want to run servers on the XP box (why on earth would you do that thought, XP isnt a server-stable OS IMHOP).
that is the general setup, you can do a search for many posts that answer this question many different ways also.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.