help to join 2 network ID PCs in single LAN
i am having a LAN which is connected to main proxy server ip 10.0.0.xxx through switch. In that LAN if i isolate a PC with single network with single PC with ip 192.168.1.192 and attach it to another computer which have 2 LAN cards in that LAN,eth0 is 10.0.0.199 and eth1 is 192.168.1.1 then can i access internet through that computer with ip 192.168.1.192?
|
Yes you can access the Internet on 192.168.1.192 by setting up Network Address Translation (NAT) on the multi-homed system (eth0:10.0.0.199, eth1:192.168.1.1). For help on how to do this visit http://en.tldp.org/HOWTO/IP-Masquerade-HOWTO/ . You can also setup a proxy server on the multihomed system but i think setting up NAT is a better choice as only one machine (192.168.1.192) from the 192.168.1.0 network requires access to the Internet.
|
Re: help to join 2 network ID PCs in single LAN
Quote:
-t nat -A POSTROUTING -s 192.168.1.192 -o eth0 -j SNAT --to-source 10.0.0.199 -t filter -A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT -t fileter -A FORWARD -i eth1 -o eth0 -j ACCEPT don't forget to run echo 1 > /proc/sys/net/ipv4/ip_forward I hope I didn't forget anything... Hope this helps. |
All times are GMT -5. The time now is 08:23 AM. |