Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Share ppp connection to my LAN?

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
hit
Posts: 2
Joined: 2015-04-07 21:34

Share ppp connection to my LAN?

#1 Post by hit »

Hello, I have a raspberry with debian wheezy 7.8 on it, exactly this image: http://www.linuxsystems.it/raspbian-whe ... mal-image/

I also have a usb 3g modem connected to it and I'm trying to use it so all my LAN can access internet from there.

The config I already have is


On the raspberry:

ifconfig

Code: Select all

eth0      Link encap:Ethernet  HWaddr b8:27:eb:69:23:a7  
          inet addr:192.168.1.40  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::ba27:ebff:fe69:23a7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:925 errors:0 dropped:0 overruns:0 frame:0
          TX packets:541 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:69299 (67.6 KiB)  TX bytes:66950 (65.3 KiB)

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:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:95.12.what.ever  P-t-P:10.64.64.64  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:36 errors:0 dropped:0 overruns:0 frame:0
          TX packets:37 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:1447 (1.4 KiB)  TX bytes:1626 (1.5 KiB)

ip route show

Code: Select all

default via 10.64.64.64 dev ppp0 
10.64.64.64 dev ppp0  proto kernel  scope link  src 95.12.what.ever 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.40 

cat /proc/sys/net/ipv4/ip_forward

Code: Select all

1

On my desktop computer:

ifconfig

Code: Select all

eth0      Link encap:Ethernet  HWaddr 1c:6f:65:8f:a3:74  
          inet addr:192.168.1.36  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::1e6f:65ff:fe8f:a374/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1440  Metric:1
          RX packets:753954 errors:0 dropped:0 overruns:0 frame:0
          TX packets:469208 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:944809472 (901.0 MiB)  TX bytes:89345056 (85.2 MiB)
          Interrupt:41 Base address:0x6000 

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:296 errors:0 dropped:0 overruns:0 frame:0
          TX packets:296 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:27910 (27.2 KiB)  TX bytes:27910 (27.2 KiB)

(NOTE: There is some data transfered on eth0 but it's using a different default via, when I'm using the raspberry as default via I cant transfer anything)

ip route show

Code: Select all

default via 192.168.1.40 dev eth0 
169.254.0.0/16 dev eth0  scope link  metric 1000 
192.168.1.0/24 dev eth0  proto kernel  scope link  src 192.168.1.36 

I can connect to internet from the raspberry normally but not from my desktop, I've been trying to ping google ip 216.58.210.131 and that doesnt work either

Can someone tell me what am I doing wrong?

Thanks

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1418
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 80 times
Been thanked: 191 times

Re: Share ppp connection to my LAN?

#2 Post by steve_v »

You need some iptables masq rules too.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

hit
Posts: 2
Joined: 2015-04-07 21:34

Re: Share ppp connection to my LAN?

#3 Post by hit »

steve_v wrote:You need some iptables masq rules too.
Great! Thanks, that fixed it.

Post Reply