Forum Moderators: bakedjake
I think I have to first set up access to the web with my Linux box(which is done), then I have to determine which gateway/IP my Linux box is using, and use an IP like 198.172.0.1 or something for the windows comp IP.... I should have the same gateway as my Linux box or something like that.
I haven't found clear instructions on what I have to do. Could anyone point me to a page that has clear instructions OR give a brief but clear instruction on how to do this here?
I would rate my computer knowledge overall as decent. Linux is pretty hazy for me. I went over it once in school but have yet to do anything with it til 3 days ago, so I forget alot.
Any help would be greatful
Thanks
Mike :)
Internet connection comesfrom the modem, into 1 NIC in the linux box, then the linux box has a second NIC with a crossover cable to the Windows Box. That's it.
Now I know you can do this, I've heard it being done before, I just don't know the steps to take to do it.
Any help would be great
Mike
To get you started, try a google for "redhat 9 masq", redhat 9 masquerade"
A quick search myself resulted in http*//docs.myjabber.net/howto/ip-Tables.htm which might be of use to you.
In short, you need to set up the Linux box to masquerade (so your internal IP address of the Windows XP box remains hidden), and turn on IP forwarding on the Linux box so it relay packets from one network card to the other.
(
echo 1 >/proc/sys/net/ipv4/ip_forward does that) HTH,
JP
I have come up with this type of configuration... I think I"m still missing something
rc.local has these entries
touch /var/lock/subsys/local
ifconfig eth1 192.168.1.1
echo"1">/proc/sys/net/ipv4/ip_forward
modprobeiptable_nat
iptables -t nat -F
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to 192.168.1.1
iptables -t nat -A POSTROUTING -S 192.168.1.2/32 -j MASQUERADE
iptables -A PREROUTING -t nat -p tcp --dport 4662 -j DNAT --to-destination 192.168.1.2
//end of rc.local
NOw my windows box is set up to have
Gateway 192.168.1.1
IP 192.168.1.2
DNS(the one my ISP auto assigns to windows before I did all this messing around)
Now I can ping back and forth... so they are connected via the cross-over on eth1 to win box.
But the win box can't see outside of the net, obviously my settings are flawed in there. I am new to linux, but not new to computers and setting up rules and such...
I wouldn't mind getting this up and running for tomorrow so I can telnet into both from work and play around with stuff :P
Anyway, thanks for the help so far, more is definitly welcome.
Thanks
I have 2 IP's that I get from my cable ISP. I would like to use my Linux box as a router for one of the IPs. Basically have my Linux box use one IP and my windows box running from my linux use the other.
I know you can Masqurate(sp error hehe) a private IP to my Windows box, and run them both off the same IP but my Linux box would route the proper packets to my Windows box. But I was wondering if I can use both the IPs since I do get them for the price of 1.
Everything that I've found so far is just the NAT or MASQ. Which in essence is really only using 1 IP and creating private IPs for the rest of the network.
Anyone have any ideas?