Solved

how to route packets for internet

Posted on 2004-10-12
8
236 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
 

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
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

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…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now