LinuxQuestions.org
Review your favorite Linux distribution.
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 09-25-2013, 09:16 PM   #1
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 131

Rep: Reputation: 15
Share internet from ppp0


Hi.

I have a 3g modem working on my linux box. Its ppp0 when its up and running. Im trying to make my laptop work as a wireless access point when I want. Using Airbase-ng and dhcpd, everything works except I cant figure out how to share the internet (ppp0) with the AP interface (at0). Ive tried:

Code:
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface at0 -j ACCEPT
The at0 interface is a 10.0.0.0/24 network and its IP is 10.0.0.1

Id appreciate any help.

Thanks!
Scrag
 
Old 09-26-2013, 06:08 AM   #2
Ipolit
Member
 
Registered: Nov 2003
Location: Bulgaria
Distribution: Vector Linux, Morphix
Posts: 321

Rep: Reputation: 33
You have to enable ip_forward
echo 1 > /proc/sys/net/ipv4/ip_forward
Flush you filter table temporary to see if you have firewall issue
iptables -F
 
Old 09-26-2013, 09:16 AM   #3
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 131

Original Poster
Rep: Reputation: 15
Thanks for the response. Here is what im using now in my script, and im afraid clients connect but still no internet. They receive a 10.0.0.0/24 address and a gateway of 10.0.0.1. The DNS servers they get are also 10.0.0.1. Prehaps the problem is I need to configure a dns server or use 8.8.8.8 for dns?

Code:
echo '1' > /proc/sys/net/ipv4/ip_forward
iptables -X
iptables -F
iptables --table nat --append POSTROUTING --out-interface ppp0 -j MASQUERADE
iptables --append FORWARD --in-interface at0 -j ACCEPT
Thanks,
Scrag
 
  


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
eth1 and ppp0, need to send UDP packets through ppp0 smhs Linux - Networking 2 07-12-2005 08:54 AM
ppp0 or eth0 internet without conflict like windows shusko9 Linux - Hardware 4 01-28-2005 12:46 PM
How do i set ppp0 as default gateway for internet sharing in Redhat? Julian_Thong Linux - Networking 11 08-18-2004 06:54 PM
Endless Loop: ppp0 Unregister Netdevice: waiting for ppp0 to be free. oberon-ken-obi Linux - Networking 1 07-20-2004 11:04 PM
cannot configure ppp0; error 2; result=no internet robertn Linux - Networking 0 05-25-2004 01:45 PM

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

All times are GMT -5. The time now is 08:57 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
Open Source Consulting | Domain Registration