PPPOE server access the internet clients fail to access the internet
Please assist. I have a linux box (fedora) with two ethernet cards eth1 and eth2. On eth1 I successfully configured a PPPOE internet connection. Such that from the server I can browse the internet.
On eth2 I wired it to a wireless router essentially to provide the wireless cloud. On eth2 I also configured dhcp, such that the Linux box is both PPPOE and DHCP server.
However my clients on the LAN cannot access the Internet.
On passing the routing command I get
Destination Gateway Iface
196.44.x.y 0.0.0.0 ppp0
192.168.1.0 0.0.0.0 eth2 (my subnet)
0.0.0.0 0.0.0.0 ppp0.
The router (functioning as a wireless access point mainly) has a fixed IP address of 192.168.1.2 and eth2 has IP address 192.168.1.1. The dhcp file running on Linux has been set with option router (Gateway) 192.168.1.1. I cannot figure out how to correctly set the routing table such that my clients on wireless can access the internet cloud. I googled and googled but no solid solution. Any suggestions?
You can share internet connection using iptables. If you just want internet sharing, you can just MASQUERADE the outgoing connections on eth2.
iptables -t nat -A POSTROUTING -o eth2 -j MASQUERADE
or something similar. This is a crude example that might work. But change it to suit your requirements. And if you are looking for something like caching the internet data, you can use squid proxy.
Great. This is quite useful. I managed to use iptables and do a MASQUERADE and it worked like a charm. I will have to look at internet caching next.
Its nice to hear that it worked. For internet caching, you need squid proxy server or similar package. Squid is the one of the most preferred caching servers.
|All times are GMT -5. The time now is 03:03 PM.|