Sharing PPP Connection

From ArchWiki
Revision as of 14:55, 23 March 2010 by Jelly (talk | contribs) (Requirements)
Jump to: navigation, search


The following programs must have been installed in order to share the ppp connection:

  1. Programs for configuring generic network interface card (package net-tools)
  2. The iptables program which is used to manipulate how data is passed through your machine from your clients and back (package iptables)
  3. dnsmasq software for acting as a DHCP and DNS caching server (package dnsmasq)
  4. If you want to share the ppp connection with more computers you need to setup a network bridge. (package bridge-utils)

The following conditions must also have been met:

  1. You must have a working ppp connection
  2. You must have a working an extra eth interface card (in terms of "can be used in Linux")


  1. Set the ppp connection up.
  2. you can assign an ip address to the interface as usual, by running (again, as root):
    ifconfig eth1
  3. Set the kernel to router mode. This is done by running as root:
    echo 1 > /proc/sys/net/ipv4/ip_forward
  4. Configure dnsmasqd. Make the following changes to /etc/dnsmasq.conf (uncomment if necessary):
    interface=eth1 (or whatever interface your wlan is)
  5. Start the dnsmasqd, as root:
    /etc/rc.d/dnsmasq start
  6. Finally, set firewall to forward connections to and from the Internet for clients connecting to your wlan. This is done by issuing (you guessed it right, as root again):
    iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
    In the above the ppp0 interface is the used ppp interface, you can substitute it for yours if needed.
  7. You are done! Happy surfing
Warning: The previous configuration has no security options enabled!
If you are using firewall, you should adapt this documentation to suit your needs.
Same applies also to setting up keys for wlan interface.

See Also