Jump to content

DNS/DHCP Services and IPTables


.exe

Recommended Posts

The documentation on OpenWrt seems to be a little sparse on how to setup both DNS + DHCP services and it would be nice to know where to configure these options ie. address ranges for connected clients.

If it would be better to run DNS on a laptop attached to the jasager could someone point me to a package. I think its BIND but im not really sure about Linux stuff.

How is isolating the web interface from attached wifi clients setup using iptables?

Link to comment
Share on other sites

Very basically, off the top of my head...

You'll have webif installed as a dependency, browse to that and use it to setup the dhcp. For dns, put the ip of your dns server in /etc/resolve.conf.

As for ip tables, pass, Darren I'm sure will be able to tell you straight off though.

Link to comment
Share on other sites

you rename the webif homepage to webif.html (or something like that) just hit that url instead of just going to /.

All that does anyway is to redirect you to the cgi-bin directory so even if you deleted the file rather than renaming it you can still visit /cgi-bin/webif.sh to visit webif. Don't use the port number, just the url and the filename.

Link to comment
Share on other sites

Web server choice depends where you are going to put it:

Jasager uses the basic webserver that webif uses. You can get apache on OpenWrt but on the Fon it probably wouldn't work too well unless it has been really well optimized.

If you just want to deliver plain html or fairly basic stuff (such as webif and Jasager) then that is fine, if you want to deliver anything more substantial (an e-commerce store) then you can probably use the basic server as a proxy to forward traffic to a webserver behind the scenes.

Ruby comes with webbrick which is a web server written in ruby. I'm not sure if the ruby install in openwrt has that functionality. This is what the original karma has. I've got mine set up to use dns to resolve all IP's to karma then the web server to reply to all pages with a html page that auto downloads an mp3 of a nice loud scream! It is quite funny seeing the log show someone has hit karma and then hearing a scream in the background!

Link to comment
Share on other sites

Ruby comes with webbrick which is a web server written in ruby. I'm not sure if the ruby install in openwrt has that functionality. This is what the original karma has. I've got mine set up to use dns to resolve all IP's to karma then the web server to reply to all pages with a html page that auto downloads an mp3 of a nice loud scream! It is quite funny seeing the log show someone has hit karma and then hearing a scream in the background!

What I really wanted was a java based chat applet so I could talk to who connects - although im still working out how to actually get that working. I like the idea of scaring the shit out of people though as most people listen to music while working.

Incidently im really interested in how your setup above works. Im puzzled how you got your dns to resolve all web pages to karma.

This would probably be an ideal topic for a new guide (especially for people like me who are windows centric and still learning about Linux).

Link to comment
Share on other sites

What I really wanted was a java based chat applet so I could talk to who connects - although im still working out how to actually get that working. I like the idea of scaring the shit out of people though as most people listen to music while working.

Incidently im really interested in how your setup above works. Im puzzled how you got your dns to resolve all web pages to karma.

This would probably be an ideal topic for a new guide (especially for people like me who are windows centric and still learning about Linux).

It should be possible to do the chat back thing. If you get it working, let us know :-)

Regarding the dns, the original karma comes with a custom dns server which just replies with its IP address to every request, the webserver then does a 301 on all pages to its exploit page.

Link to comment
Share on other sites

Ive just noticed my jasager isnt doing what its supposed to do either - seems like the jasager.ipk isnt installing correctly and this may be the problem, Did you do a tar install for it?

What are the symptoms of it not working? You can get a tarball from the download page

Link to comment
Share on other sites

What are the symptoms of it not working? You can get a tarball from the download page

Sorry my bad its working - too much pot and not enough sleep. Forgot to enable Karma.

As for DNS it may be possible to point Jasager at OpenDNS and use that to do custom routes. For example, http://mail.google.com to point at http://192.168.1.163/gmail.html

You get the idea =P

What about being more forceful and putting in a custom hosts file? You give them a 404 page but it rewrites all the paths to something really nasty on the public internet. You could even combine this with a custom script to boot people off your Jasager so they can connect back up to their regular AP.

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