Author Topic: Internet sharing not working  (Read 749 times)

Offline IceDigger

  • Jr. Member
  • **
  • Posts: 36
Internet sharing not working
« on: July 31, 2012, 11:41:34 AM »
Using the latest PCLinux OS, LXDE, with 2 realtek adapters.

Trying to setup internet sharing on my PCLinuxOS machine in PCC and it keeps saying "no ethernet network adapter configured for lan has been detected on your system"

I already configured eth0 manually for the internet connection and have eth1 as dhcp.

I have comcast router going into eth0, and eth1 going into a gigabit switch which I will connect the other computers to.
« Last Edit: July 31, 2012, 11:43:08 AM by IceDigger »
PC - Intel i7 3930k 6 Core CPU, 32GB Quad Channel RAM, Gigabyte x79 Motherboard, ATI 7990 Video Card

Offline pupthai

  • Hero Member
  • *****
  • Posts: 1425
  • PCLinuxOS 2011 2 - KDE4
Re: Internet sharing not working
« Reply #1 on: July 31, 2012, 11:55:37 AM »
If you have a router why are you sharing the connection. plug the switch into the router and your pc's into the switch.
PCLinuxOS 2011 2 - KDE4
Intel 2 core duo @3.22gig, Asus P5G41/M, DDR2/1066 4gig, ENGT220 DDR3/1gig, 2x Seagate 250gig.

Offline IceDigger

  • Jr. Member
  • **
  • Posts: 36
Re: Internet sharing not working
« Reply #2 on: July 31, 2012, 11:59:58 AM »
That is the way I would like to do it.
PC - Intel i7 3930k 6 Core CPU, 32GB Quad Channel RAM, Gigabyte x79 Motherboard, ATI 7990 Video Card

Offline pupthai

  • Hero Member
  • *****
  • Posts: 1425
  • PCLinuxOS 2011 2 - KDE4
Re: Internet sharing not working
« Reply #3 on: July 31, 2012, 12:11:26 PM »
OK  :D  something in here might help

https://wiki.archlinux.org/index.php/Ad-hoc_networking
PCLinuxOS 2011 2 - KDE4
Intel 2 core duo @3.22gig, Asus P5G41/M, DDR2/1066 4gig, ENGT220 DDR3/1gig, 2x Seagate 250gig.

Online muungwana

  • Hero Member
  • *****
  • Posts: 6236
Re: Internet sharing not working
« Reply #4 on: July 31, 2012, 12:15:41 PM »
what does these commands give you?

ifconfig

cat /proc/sys/net/ipv4/ip_forward
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline IceDigger

  • Jr. Member
  • **
  • Posts: 36
Re: Internet sharing not working
« Reply #5 on: July 31, 2012, 02:18:57 PM »
here is ifconfig

Quote
eth0      Link encap:Ethernet  HWaddr 00:E0:4C:77:98:29 
          inet addr:50.73.221.217  Bcast:50.73.221.223  Mask:255.255.255.248
          inet6 addr: fe80::2e0:4cff:fe77:9829/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:34390 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25353 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:43101466 (41.1 MiB)  TX bytes:13578791 (12.9 MiB)
          Interrupt:20 Base address:0x6c00

eth1      Link encap:Ethernet  HWaddr 00:1E:2A:D6:20:1B 
          inet6 addr: fe80::21e:2aff:fed6:201b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:59 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:10000 (9.7 KiB)
          Interrupt:21 Base address:0x8800

eth1:9    Link encap:Ethernet  HWaddr 00:1E:2A:D6:20:1B 
          inet addr:127.255.255.255  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:21 Base address:0x8800

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:16 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1260 (1.2 KiB)  TX bytes:1260 (1.2 KiB)

cat /proc/sys/net/ipv4/ip_forward comes back with a 0
PC - Intel i7 3930k 6 Core CPU, 32GB Quad Channel RAM, Gigabyte x79 Motherboard, ATI 7990 Video Card

Online muungwana

  • Hero Member
  • *****
  • Posts: 6236
Re: Internet sharing not working
« Reply #6 on: July 31, 2012, 03:12:29 PM »

open the terminal and then log into root's account.

run this command
Quote
echo 1 > /proc/sys/net/ipv4/ip_forward

The above command will allow traffic to flow from one interface to another.

then run this command
Quote
iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE
The above command will hide all traffic from your local network eth1 is connected to.

Now, go to pcc and then give eth1 a static IP address and you should be good to go.
i would give eth1 the following network properties.

IP address: 10.10.10.1
netmask  : 255.255.255.0

Other options are not necessary and dont mind if pcc compain about anything.

set your other computer's to have IP addresses btw 10.10.10.2 and 10.10.10.154 and a gateway address of "10.10.10.1" and you should be good to go.

You can make up your own numbers if you know what you are doing. Above numbers are there for your convenience.

The settings wont survive reboot, will talk about that when things are set.
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline IceDigger

  • Jr. Member
  • **
  • Posts: 36
Re: Internet sharing not working
« Reply #7 on: July 31, 2012, 03:26:10 PM »
Thank you for the help.  I will try it when I get into work tomorrow.

Whats a way to make it permanent?
PC - Intel i7 3930k 6 Core CPU, 32GB Quad Channel RAM, Gigabyte x79 Motherboard, ATI 7990 Video Card

Online muungwana

  • Hero Member
  • *****
  • Posts: 6236
Re: Internet sharing not working
« Reply #8 on: July 31, 2012, 04:12:13 PM »
Quote
service iptables save
The above command will save the rule to iptables configuration file making the rule survive reboot.
Just set in pcc iptables to start at boot time

open "/etc/sysctl.conf" and then add the following line
Quote
net.ipv4.ip_forward = 1

make sure you do not have a duplicate line with assignment of 0
.. 3 things are certain in life : death, taxes and software bloat ..
.. tell me something i don't know, something i can use as i struggle to reason with the world around me ..

Offline IceDigger

  • Jr. Member
  • **
  • Posts: 36
Re: Internet sharing not working
« Reply #9 on: August 01, 2012, 11:49:23 AM »
That worked great!

Thank you!
PC - Intel i7 3930k 6 Core CPU, 32GB Quad Channel RAM, Gigabyte x79 Motherboard, ATI 7990 Video Card