LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-26-2015, 06:52 AM   #1
yerunkar11
LQ Newbie
 
Registered: Mar 2015
Posts: 24

Rep: Reputation: Disabled
transfer internet from eth1 to eth0


Hello,

I am using centos 6.6 with latest updates.

Now here in My scenario,

I want to share the internet via my centos.

I have two ethernet cards, Eth1 is primary from which i am using internet.

here i want to share the internet via eth0,

How can do this. please help and thanks in advance.

---------- Post added 06-26-15 at 05:22 PM ----------

and 1 more thing, I have like 20 windows client in my network.
 
Old 06-26-2015, 06:54 AM   #2
yerunkar11
LQ Newbie
 
Registered: Mar 2015
Posts: 24

Original Poster
Rep: Reputation: Disabled
I have also tried doing the echo 1 > /proc/sys/net/ipv4/ip_forward.. this thing wont worked in my scenario
 
Old 06-26-2015, 07:28 AM   #3
kaushalpatel1982
Member
 
Registered: Aug 2007
Location: INDIA
Distribution: CentOS, RHEL, Fedora, Debian, Ubuntu, LinuxMint, Kali Linux, Raspbian
Posts: 166

Rep: Reputation: 10
Apart from this configuration you also need to configure iptables masquerade (NAT) all traffic from LAN interface to WAN interface. You need below command to run on your linux router :

Quote:
iptables -t nat -I POSTROUTING -o eth1 -j MASQUERADE
 
Old 06-26-2015, 07:55 AM   #4
paul2015
Member
 
Registered: Apr 2015
Distribution: CentOS Fedora
Posts: 149

Rep: Reputation: 4
you must define rc.local script to enable forwarding on startup becouse when you just echo > 1 /proc/sys/net/ipv4/ip_forward after system reboot you will have 0. or you must edit /etc/sysctl.conf define net.ipv4.ip_forward = 1 save and sysctl -p /etc/sysctl.conf
 
  


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
[SOLVED] No internet, ethernet eth0 or eth1 after installing Slackware 14.1 (64-bit) Giuliano Marco Slackware 6 11-17-2013 08:40 AM
My Internet and Network are Down (eth0, eth1) alMubarmij Mandriva 2 02-19-2009 02:30 AM
CentOS 5.2: Only one of eth0 (internet) or eth1 (LAN) works Sinedie Linux - Networking 3 08-20-2008 04:52 AM
Dhcp eth0 and XP eth1 internet sharing props666999 Slackware 8 08-20-2005 09:48 AM

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

All times are GMT -5. The time now is 05:40 PM.

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
Open Source Consulting | Domain Registration