LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-06-2005, 12:06 PM   #1
cranium2004
Member
 
Registered: Feb 2004
Distribution: FC4,RHEL4
Posts: 223

Rep: Reputation: 30
How to allow traffic from One Network to Other???


If I have Linux PC1 with eth0 say 10.0.0.10 and and eth1 say 192.168.1.1 which is connected through crossover wire to another Linux pc2 with eth0 say 192.168.10 then how can i use Internet on PC2 that i am able to use on PC1 by using Proxy id of my Organisations Proxy Server???
 
Old 01-06-2005, 12:17 PM   #2
manvirr
Member
 
Registered: Jul 2004
Location: Chandigarh
Distribution: RedHat 9.0
Posts: 34

Rep: Reputation: 15
You can do this by setting up iptables on your pc 1.

Create a file "rc.firewall" in /etc/rc.d folder and write the following in it.
###########
modprobe iptable_nat
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -j LOG
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
#######end of script###########


Now save this file and give it execute permission.....

now open /etc/rc.init for editing and append the following line at the end

/etc/rc.d/rc.firewall

asve the file and run rc.firewall from the shell

now on pc2

open your network settings and give the gateway adderss as 192.168.1.1 save and restart network

now try to ping your organisations proxy host... if everything works fine give the proxy settings as that on pc1...

Internet should work on pc2

Cheers
Manvir
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Traffic Brian031168 Linux - Networking 3 12-02-2005 11:18 PM
When the network traffic increase over some limit network works interruptedly therrman Linux - Hardware 0 11-15-2005 02:23 AM
Can't get any network traffic jonlake Linux - Networking 6 05-27-2004 10:43 AM
fine network traffic... mahamkali Linux - Networking 3 12-05-2003 12:11 AM
Network Traffic BxBoy Programming 3 02-24-2003 08:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration