Network's DNS queries redirection to localhost

Before claiming anything, I would certainly like you to recognize that my experience in the area of network management has to do with 3 days long, so please treat me like the rookie I am. I have actually additionally been checking out 2 of these 3 days searching for the most effective means to attain my purpose, and also I have actually located comparable inquiries around the net, yet I have actually not had the ability to do it.

I am running an Apache2 web server on localhost:8080 from a Mac OS X totally upgraded Lion. This Mac is attached via Ethernet (user interface en0) to a cordless Access Point. In the AP, I have actually set up the portal to be 192.192.192.1, and also I have actually considered that IP address to en0. The purpose of this network is rerouting any person is http/https applications to the localhost of the portal, revealing them the web page that apache is offering.

- If prior to this factor there is any kind of theoretical blunder, please allow me recognize -

As much as I have actually recognized, the most effective means to do this redirection is making use of the pf.conf documents and also pfctl, yet the male web page of pf.conf left me with a little a WTF face. I have located in freebsdonline.com these guidelines to do something comparable:

# --------- pf.conf ----------
int_if="fxp0"
ext_if="fxp1"

rdr on $int_if inet proto tcp from any to any port www -> 127.0.0.1 port 8080
pass in on $int_if inet proto tcp from any to 127.0.0.1 port 8080 keep state
pass out on $ext_if inet proto tcp from any to any port www keep state
# ------- end pf.conf -------

The point is that this pf.conf appears to be forwarding packages in between 2 user interfaces, and also I do not require that (do I?). Could you aid me to adjust, or at the very least recognize that lines? And also exists anything else I require to do as soon as that lines have been included in pf.conf?

P.S: If you recognize any kind of less complicated means of doing this redirection things, I'll rejoice to hear it. I however around making use of dnsspoof, yet I have not had the ability to find it for OSX.

3
2022-06-07 14:40:48
Source Share
Answers: 1

Since you really did not state it, I would certainly see to it to browse to:

/private/etc/apache2/  

and also open (utilizing your full-screen editor of selection ; vi/m functions, certainly)

httpd.conf  

Once you exist, see to it that lines 39 and also 40 (or thereabouts) read:

Listen *your_web_site's_address*:8080  
Listen 8080  

If it reviews

Listen 12.34.56.78:80  
Listen 80  

Then that is absolutely a large component of your trouble, as the web server is paying attention on the incorrect port completely. As constantly, see to it to effectively configure your firewall program (s)!

1
2022-06-07 15:08:59
Source