Solved

how to route packets for internet

Posted on 2004-10-12
8
255 Views
Last Modified: 2010-03-18
i am having a LAN which is connected to main proxy server through switch. In that LAN if i isolate a PC with single network with single PC and attach it to another computer which have 2 LAN cards in that LAN then can i access internet through that computer?

0
Comment
Question by:cranium2003
8 Comments
 
LVL 1

Expert Comment

by:reketnet
ID: 12286877
Ofcource you can , just you need to know how to configure the OS of that computer so share its internet connection and you will have internet ,too. Tell us what the OS is and we will tell you how you can do that.If it is linux you have to enable ip_forwarding and configure the masq. or to make SNAT. If Windows you need to enable internet connection sharing.

regards,
0
 

Expert Comment

by:sykat
ID: 12307667
In Windows you can also use proxy server named "Wingate Proxy Server", "WinProxy" etc for internet connection sharing. Make sure that in that case disable "Internet Connection Sharing" option.
0
 
LVL 2

Expert Comment

by:Sunjith
ID: 12311208
The following commands should enable you to access internet through that computer:
-----
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
echo "1" > /proc/sys/net/ipv4/ip_forward
------
 Where eth1 is the interface which connects to the internet. You may add the above commands to any initialization scripts so that reboots won't be a problem. You may also want to run a DNS server on that computer or configure all systems to query your ISP's DNS servers.
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:cranium2003
ID: 12330901
hi reketnet,
          I am using Redhat 9 on all my computers with default kernel installed. please tell me how can i configure it to able to access internet from my own proxy server created by me in my LAN. Before can you help me to setup my router PC having two LAN cards as proxy server?
0
 

Author Comment

by:cranium2003
ID: 12330905
hi reketnet,
          I am using Redhat 9 on all my computers with default kernel installed. please tell me how can i configure it to able to access internet from my own proxy server created by me in my LAN. Before can you help me to setup my router PC having two LAN cards as proxy server?
0
 
LVL 1

Accepted Solution

by:
reketnet earned 50 total points
ID: 12331471
Hi ,
from here download your proxy server http://www.squid-cache.org/Versions/v2/2.5/ , then read this http://squid.visolve.com/squid/sqguide.htm and step by step you will configure your proxy server. Then make the second lan card with private ip address and enable the ip_forwarding and with iptables make you SNAT iptables -t nat -A POSTROUTING -s your_private_Ip/255.255.255.0 -j SNAT --to-source "your_lan_ip" manage your INPUT OUTPUT and FORWARD policies and you are ready.

regards,
0
 

Expert Comment

by:nickich
ID: 12367441
Hello,

If you have internet on eth0, and you have attached PC on eth1 -


route add default gw IP_eth0  // where IP_eth0 is IP on interface eth0 (your real inet IP)

iptables -t nat -A POSTROUTING -s your_target_pc_ip  -j MASQUERADE


 your_target_pc_ip  is IP on this PC you want internet.

Good  Luck!
0
 

Author Comment

by:cranium2003
ID: 12407989
hello nickich,
         As you said i did it my alone pc has ip 192.168.1.192 and router pc has eth0 10.0.0.199 and eth1 192.168.1.1
now i have one more pc on lan netid 10.0.0. with ip 10.0.0.76. but i am unable to ping from 192.168.1.192 to 10.0.0.76 but able to 10.0.0.199.
Also how can i access internet in mozilla. give me wihch settings to use as proxy in mozilla.
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question