Discussion Locked

Making 2 networks in LAN

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
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?

5 replies

by jireland607

I believe you can, we have a similar setup on our server here at work. You will probably need to enter the computer 192.168.1.1 as the gateway on the other computer.

by alokchauhan1

yes u can access the internet but for it u have to install NAT or MASQUARADE on common system for both n/w. if u r using the Linux then i can give u a few commands or can write a firewall for u for both internet access and seperation also n this depends on IPTABLES . if u r intersted then pls let me know.

by jackperez

Try using NAT (Network Address Translation). For this you would need two network cards (eth0 and eth1). Set your firewall with IPTables. configure the eth1 to be your internal network and assing the intenal network with non-routeble IPs like 192.168.0.1 255.255.255.0. Once this is done you sumite the command: /sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE. This will be more versatile thin SQUID and in some cases faster. Rimember that Linux is case sencitive so you would have to type the command exacly the way is type. Also, it will not do ftp. If you want ftp you would need to give the command: /sbin/modprobe -a ip_conntrack_ftp ip_nat_ftp. Good luck!

This discussion is closed to new replies.