LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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-10-2014, 11:28 PM   #1
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Rep: Reputation: Disabled
Unhappy Need help with Internet connection sharing on Fedora 19 OR Ubuntu 12.10


Hello again!

What I want do do has been asked of before, and although it seems more than one person has had this issue resolved, none of the solutions seem to apply to EITHER of my current systems!

I will try to be as straight-forward and pose my question as clearly as I am able: I wish to receive my internet via a wireless connection ( I am already doing so, I mean), and then use the wired port of the same computer to share this internet connection. Now, I know this has been asked and solved a million times in the past, but why don't those solutions seem to apply ANYMORE?

First of all, I find that iptables isn't even RUNNING on my Ubuntu Studio 12.10 system ( when I type such lines as :
"service iptables stop"

or similar, the system responds with:
"iptables: unrecognized service"

and I'm pretty sure that my Fedora 19 system doesn't utilize iptables any longer either?!

So, all of the examples of how to enable NAT on Linux machines falls flat whenever I try it! I have googled SPECIFICALLY for "How to enable ICS on Fedora 19", and nothing comes back that is relative to my issue. Quite frustrating...; all of the "solutions" seem to be using the same method(s), and none of those methods apply anymore!

Now, I was just beginning to LIKE iptables, when now it seems that Linux is MOVING AWAY from it? Is this correct, or am I mistaken?

Is there a "modern", easier way to to what I'm trying to do on these newer versions of Linux, or do I need to go back and get an older version of Linux that still uses iptables? I mean, I started out with Slackware, and if I have to, I'll go back to it in a heartbeat; it's just that I like Fedora 19 and Ubuntu Studio so much for their package management capabilities...

Any suggestions would be greatly appreciated!

Thanks in advance...
 
Old 01-11-2014, 04:15 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,615

Rep: Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584Reputation: 584
Have you tried an 'ad-hoc' wireless connection?
 
Old 01-12-2014, 06:53 AM   #3
wstewart90
Member
 
Registered: May 2013
Distribution: Arch Linux
Posts: 79

Rep: Reputation: Disabled
Iptables isn't usually a service in linux. That's just the way redhat does it. Last I checked ubuntu doesn't load any iptables rules by default. Check to see if there are even any rules with
Code:
iptables-save
If there are any rules then you can flush them with

Code:
iptables -t filter -F
iptables -t filter -X
iptables -t filter -Z
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -t mangle -F
iptables -t mangle -X
iptables -t mangle -Z
iptables -t raw -F
iptables -t raw -X
iptables -t raw -Z
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
Also check /etc/network/interfaces in ubuntu to see if there's a rule loading an iptables script somewhere.

Fedora is using firewalld now but if you really want to use iptables then you can disable firewalld and enable iptables with
Code:
systemctl disable firewalld
systemctl stop firewalld
systemctl enable iptables
systemctl start iptables
I'd recommend learning firewalld because it really is simpler to manage than iptables.

Code:
man firewall-cmd
Make sure ip forwarding is enabled in the kernel otherwise the computer with wireless won't act as a router and forward packets.

Code:
echo 1 > /proc/sys/net/ipv4/ip_forward && echo 'net.ipv4.ip_forward' >> /etc/sysctl.conf
Make sure you've got a static ip on the wired interface of both computer and make sure that the computer without wireless can ping the other one and is using it as the default gateway. That should be all you need. Try it with iptables disabled first. If it still doesn't work then post your ping results between the two systems on the wired interface and the results of
Code:
netstat -rn
. Also disable selinux if it's enabled just in case.

Last edited by wstewart90; 01-12-2014 at 07:07 AM.
 
1 members found this post helpful.
Old 01-12-2014, 12:21 PM   #4
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Unhappy On using ad-hoc wireless connection

Quote:
Originally Posted by business_kid View Post
Have you tried an 'ad-hoc' wireless connection?
Yes, I know that method and have tried it: You mean receive the wireless internet signal via one wireless adapter, and then create an ad-hoc wireless network using a SECOND wireless adapter, I assume? This is unacceptable for my purposes: here's why:

My internet connection comes wirelessly via a neighbour's router (ie. outside of my own home), and so it is NEVER better than about 40% signal strength. Now, I have 10 pc's on my in-home LAN, almost all of which require internet access at some point or another...
Using an "in-house" wireless AP to share the external wireless signal degrades the signal to such a degree that it is hardly even useful! Also, each pc would require it's OWN wireless adapter to connect to that ad-hoc network (that's at least 8 more wireless NIC's I would need :-{ )

Also, wireless signals in my house are notoriously NOISY, and are at best intermittant (EXCEPT in the location where I receive the "outside" wireless internet signal, of course...).

What I have been doing up until now is using a triple-core Dell desktop pc to receive the external wireless internet signal, and then I "share" that internet connection to my entire LAN via the on-board WIRED ethernet port on that same pc. Effectively, my Dell desktop pc becomes my in-house WIRED ROUTER / Internet connection.

The problem I am having is: The aforementioned Dell desktop pc is currently running Windows (which makes Internet Connection Sharing quite a breeze, to be quite honest!), but: after a day or two, I always need to RE-START that pc, as by this point the signal has almost completely "degraded" (it's so slow as to be almost useless on most of the other pc's on my LAN...; it's NOT the outside signal that's degraded, but the signal being passed over my wired LAN that has degraded!); re-starting Windows fixes this problem each time. Therefore, I have to assume that the problem is a Windoze issue, but what a bloody pain!
I just let the Dell "sit there", sharing it's internet connection, and after a short period of time, that pc needs to be re-started! How does that make sense?

I wish I could use a Linux distro IN PLACE of Windows on that machine, to share the internet connection. I just don't know HOW to set up ICS on any Linux distro that I run! I have never successfully been able to get ICS to work on Linux EXCEPT by using the "ad-hoc" wireless method that you suggested...

I really need a WIRELESS internet-receive capability, coupled to a WIRED shared ethernet port solution here!

I am even willing to try out a DIFFERENT Linux distro than the two I had mentioned in my previous posting! I simply want a distro for which a WORKABLE Internet Connection Sharing method exists that is "tried and true"! Basically, I need a list of steps that I can apply via a Linux terminal which will allow me to share that wireless internet signal (that's ALL that the Linux installation will EVER NEED TO DO, really!).

Anybody out there with the skills to help me out? I'm kinda desperate here...

Thanks again for any and all suggestions!

ZTagr.
 
Old 01-12-2014, 12:39 PM   #5
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Talking Thanks a bunch!

Quote:
Originally Posted by wstewart90 View Post
Iptables isn't usually a service in linux. That's just the way redhat does it. Last I checked ubuntu doesn't load any iptables rules by default. Check to see if there are even any rules with
Code:
iptables-save
If there are any rules then you can flush them with

Code:
iptables -t filter -F
iptables -t filter -X
iptables -t filter -Z
iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -t mangle -F
iptables -t mangle -X
iptables -t mangle -Z
iptables -t raw -F
iptables -t raw -X
iptables -t raw -Z
iptables -P INPUT ACCEPT
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
Also check /etc/network/interfaces in ubuntu to see if there's a rule loading an iptables script somewhere.
That's the information I was looking for! Thank you very much, wstewart90! Actually, not only the part I quoted, but the entire reply was extremely helpful!

I am going to jump on my Fedora 19 system and see if I can get ICS to work on it right away; I'll let you know the results in just a little bit! I'll also try it on my Ubuntu system, but I would really prefer to use 64-bit Fedora 19 for this purpose (I'm more comfortable having a "root" user account as well as my regular user account in most cases :-} ).

PS - Please ignore my SECOND posting; I was responding to business_kid's reply, and had not yet read wstewart90's...

ZTarg
 
Old 01-12-2014, 07:54 PM   #6
ZTagr
LQ Newbie
 
Registered: Aug 2013
Posts: 14

Original Poster
Rep: Reputation: Disabled
Thumbs up Got it - THANKS A BUNCH!

Quote:
Originally Posted by wstewart90 View Post
I'd recommend learning firewalld because it really is simpler to manage than iptables.

Code:
man firewall-cmd
Make sure ip forwarding is enabled in the kernel otherwise the computer with wireless won't act as a router and forward packets.

Code:
echo 1 > /proc/sys/net/ipv4/ip_forward && echo 'net.ipv4.ip_forward' >> /etc/sysctl.conf
Make sure you've got a static ip on the wired interface of both computer and make sure that the computer without wireless can ping the other one and is using it as the default gateway. That should be all you need. Try it with iptables disabled first. If it still doesn't work then post your ping results between the two systems on the wired interface and the results of
Code:
netstat -rn
. Also disable selinux if it's enabled just in case.
I got ICS working on Fedora 19 using firewalld! Once I knew about "MASQUERADING" and the like, I got ICS working in a jiffy!!! I just used the GUI interface to firewalld...

Thank you, wstewart90!

ZTagr.
 
  


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
Internet Connection Sharing in Ubuntu 9.10 pranavk_uict Linux - Newbie 2 02-19-2010 12:14 AM
Internet Connection Sharing in Ubuntu es0teric Linux - Networking 1 03-06-2009 12:16 PM
Help !!! Ubuntu Internet Connection Sharing PopaBogdan Linux - Networking 4 01-02-2007 09:43 PM
Internet Connection Sharing in Fedora with PS2 linuxbotx Fedora 1 01-26-2006 10:24 AM
How to configure Internet Connection Sharing in Fedora 4 raport Linux - Software 12 01-08-2006 07:46 PM


All times are GMT -5. The time now is 09:05 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration