Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
07-07-2014, 08:08 PM
|
#1
|
LQ Newbie
Registered: Jul 2014
Posts: 2
Rep:
|
2 networks in and 1 out
I have two external connections, one is internet (eth1 velox-ip: 192.168.0.10) and the other is a company intranet (eth0 ip: 10.1.240.x) and a local (eth0 in the range 10.1.240.x) I want to put it to work as follows:
one computer with 2 network cards input for velox and intranet, and other output for the company pcs. to work all in one conection.
i used the command route add default gw 192.168.0.10 to leave the internet as the main gw, and put it in rc.local:
echo 1> / proc/sys/net/ipv4/ip_forward
iptables-t nat-A POSTROUTING-o eth1-j MASQUERADE
if internet works,the intranet network doesn't works, and if i put the intranet gw as default, the internet conection doesn't works. how can i put the two conections to works together.
|
|
|
07-07-2014, 10:02 PM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,225
|
Quote:
Originally Posted by oreizinho
I have two external connections, one is internet (eth1 velox-ip: 192.168.0.10) and the other is a company intranet (eth0 ip: 10.1.240.x) and a local (eth0 in the range 10.1.240.x) I want to put it to work as follows:
one computer with 2 network cards input for velox and intranet, and other output for the company pcs. to work all in one conection.
|
This sounds like two connections. Are there two or three NICs?
Quote:
i used the command route add default gw 192.168.0.10 to leave the internet as the main gw,
|
You are routing packets to your own eth1 port. That doesn't sound right.
Quote:
and put it in rc.local:
echo 1> / proc/sys/net/ipv4/ip_forward
iptables-t nat-A POSTROUTING-o eth1-j MASQUERADE
if internet works,the intranet network doesn't works, and if i put the intranet gw as default, the internet conection doesn't works. how can i put the two conections to works together.
|
You are missing spaces in the line you posted. That command would not work.
|
|
|
07-07-2014, 10:33 PM
|
#3
|
LQ Newbie
Registered: Jul 2014
Posts: 2
Original Poster
Rep:
|
There are 3 conections, 2 external(but one has internet and other is an intranet) and 1 local. So i wanna share the two external conections over the lan conection.
|
|
|
All times are GMT -5. The time now is 01:03 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|