LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-02-2014, 09:12 AM   #1
dundu
LQ Newbie
 
Registered: Jul 2012
Distribution: Redhat,Fedora,centos
Posts: 17

Rep: Reputation: Disabled
Unhappy Internet share via lan port


Hi

One of my laptop(Redhat) have internet connection through wireless lan (wlan1), it have ethernet port eth0
How can i share internet via ethernet eth0
Gateway Ip= 10.0.0.1/255.255.255.0 (modem-dhcp)
PC1--> ip --> 10.0.0.2/255.255.255.0 ( internet pc)
pc2 --> ip --> 10.0.0.4/255.255.255.0,gateway :10.0.0.2

I did some steps on pc1
----------------
enabled Ip forward ( sysctrl -w ne.ipv4_forward= 1)
# iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
# iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
# iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT

But no internet on pc2
 
Old 08-03-2014, 10:54 AM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,985

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
I think this is all current (except you see the log in as root comment.) http://www.cyberciti.biz/faq/rhel-fe...sharing-howto/
 
  


Reply



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
unable to share internet with LAN/mandriva 2007 mammen_in_linux Linux - Wireless Networking 2 08-17-2007 08:28 AM
unable to share internet with LAN/mandriva 2007 mammen_in_linux Linux - Networking 2 01-16-2007 07:35 AM
Setting up gateway to share internet for private LAN muru Linux - Networking 6 09-17-2005 08:08 PM
How can I share my Internet connection with other LAN ms windows users emiliofil Linux - Networking 1 02-21-2004 10:01 AM
Home LAN/Internet Share? JustinS Linux - Newbie 10 11-12-2001 06:41 PM

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

All times are GMT -5. The time now is 11:54 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