Jump to content

Connecting Pineapple Mk4 To Dsl Router


smoothanx

Recommended Posts

Hi Everyone,

Long time reader, first time poster.

I just got my pineapple and I was planning to connect the pineapple to a DSL router (via an ethernet cable) facing the internet with a 192 private IP addressing scheme. What is the simplest and quickest method to change all required IP addresses settings on the pineapple to allow it to function with the DSL router and the internet?

Any help or tips would be greatly appreciated. Thankyou.

Link to comment
Share on other sites

The quickest way without changing any IP's is to connect your DSL with a cable to your pineapple WAN port en connect your PC to either the PoE/LAN port on the pineapple or WiFi.

But to configure the WAN port to enable NAT, you must add lines to your iptables.

I'm using it in a similar setup like your and added the following code to the WPS button script located at the configuration page http://172.16.41.1/pineapple/config.php

Add this code (source):

#!/bin/sh
#Script is executed when WPS button
#is pressed for 2-4 seconds.
iptables -A FORWARD -i eth1 -o wlan0 -s 172.16.42.0 -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

After you clicked the button "Update WPS script" when the WPS button on your pineapple is pressed for 2-4 seconds NAT'ing will be enabled.

NOTE: After a reboot or replug you need to press the WPS button again to enable NAT.

Link to comment
Share on other sites

Thanks for your speedy reply.

The problem is I don't want the pineapple directly connected to a PC. The setup I was going for was as follows;

Internet -- DSL Router -- Pineapple

|

|

PC

The DSL Router has 4 ethernet ports on it.

how bout not connecting to pc and then on your own network you reference the pineapple via the ip your router gave the pineapple instead of 172.16.42.1/pineapple maybe 192.168.1.105/pineapple?

might work I am not 100%

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...