OpenWrt Forum Archive

Topic: How can I rewrite domain name to use with redirecting to specific webs

The content of this topic has been archived on 12 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

How can I rewrite domain name to use with redirecting to specific website.

        Wifi user visits
        Address bar will still say
        Browser displays the content of

Nodogsplash and Chillispot seems like its a splash page then it gives access to internet this router is simply to keep people on my website only.

Is there any way to do this using only iptables or dns server?

See DNS and DHCP configuration

Set up in /etc/config/dhcp:

config domain
        option name             ''
        option ip               ''

Where is IP adress.

Also you can use Privoxy for advanced filtering capability.

Is this something that is possible to rewrite all domain names to my IP?

config domain
        option name             '*'
        option ip               ''

Basically I would like any domain name visited to silently browse my website with the URL intact so the links in the website works.

Try some transparent proxy: tinyproxy, squid etc.
If proxy works on the router, then run:

iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8888

If proxy works on other host ( for example), then run on router:

iptables -t nat -A PREROUTING -i br-lan -s ! -p tcp --dport 80 -j DNAT --to
iptables -t nat -A POSTROUTING -o br-lan -s -d -j SNAT --to
iptables -A FORWARD -s -d -i br-lan -o br-lan -p tcp --dport 8888 -j ACCEPT

Traffic will be redirected to the proxy server. On the proxy you can manage traffic.

Black Roland I will be glad to pay you to help me set that up using teamviewer if you are willing.  I am still waiting for my router to come in the mail from china with Attitude Adjustment preloaded.

Hey, I wanted to do a similar thing, redirect all traffic to a certain web page.
Doing this is called Rick Rolling.

I found this website:

Just follow the steps and change for the address you want.

You don't need a wifi pineapple or jasager just an openwrt router with dnsmasq.

The discussion might have continued from here.