Jump to content

Internet through WAN


Rainman_34

Recommended Posts

I know this has been asked in the past but it seems that every answer I can find leads to a link which is no longer valid. I know the WAN port is for providing internet to the pineapple without a computer. So what I want to do is run a CAT5 cable from my home router to the WAN port on the pineapple. In doing this my pineapple receives an IP from the router and it even gets internet. However my pineapple won't pass that internet to any connected clients. Could someone please point me to how I can solve this issue so I can setup my pineapple to push internet to any connected clients while it is connected to my router without me having to keep a computer connected to it.

Link to comment
Share on other sites

I'm not sure if this is the best way to do it, but I think you could just use the firewall to forward IP packets from your ethernet interface to the wireless interface that clients connect to. It works from a wireless interface to another wireless interface so I don't see why it wouldn't work for a wired interface to a wireless interface.

sysctl -w net.ipv4.ip_forward=1 #enable forwarding
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE #forward from eth0 (has internet)
iptables --append FORWARD --in-interface wlan0 -j ACCEPT #to wlan0 (needs internet)

That is assuming you are connected to your router on eth0 and need to share on wlan0 so adjust that accordingly if that isn't the case.

Then if that works and so you don't have to type that everytime or execute a script with it, you can edit /etc/config/firewall and place the settings to have that already configured and ready to go on boot.

There's also the way where you actually create a bridge between the two interfaces which is described in this post: https://forum.openwrt.org/viewtopic.php?id=39077which Darren linked to earlier. Though it to deals with a wireless to wireless interface I'm sure it can be configured to go from wired to wireless with little modification.

Also might the wp6.sh script help with this? I know it's meant for the new pineapples but you could look through the script and see what it's doing to set things up which still may apply even to your pineapple.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...