Recommended Posts

anyone have any idea how to schedule all traffic (mainly port 80) to redirect ?

ie: rather than simply use a schedule to cut off access, i'd like to route to a page during set times that gives a description of why the connection isn't working.

almost like a 'walledgarden' state, but on a schedule

i'm running DD-WRT mega, btw

Link to comment
https://www.neowin.net/forum/topic/848900-scheduled-re-routing-via-router/
Share on other sites

From what I understood, you want traffic (presumably outside, internet traffic) redirected to another server (or port on the same server) at specific times?

One way this could be accomplished is through Destination NAT and iptables. Since you're using DD-WRT, you basically have a Linux box capable of doing these things for you ;).

telnet into your router and issue a command similar to the following:

iptables -t nat -A PREROUTING -d 192.168.1.1 -p tcp --dport 80 -m time --timestart 00:00 --timestop 08:00 --days Mon,Tue,Wed,Thu,Fri -j DNAT --to-destination 192.168.1.2:8080

This iptables rule will catch packets coming into the network (from the internet for example) and "re-route" the packet accordingly.

"-d 192.168.1.1" would be the destination address of your web server.

"--dport 80" is the port the web server is listening on (port 80)

"-m time" sets up a rule to look at time and date - configure "--timestart", "--timestop" and "--days" to your needs

"-j DNAT" tells the router what to do when a match is found (in this case, preform a Destination NAT)

and finally,

"--to-destination 192.168.1.2:8080" is the re-directed location and port you want the traffic to go to instead.

Now, the above is a very crude example of how you could do this with iptables. I'm pretty sure there are others here that have a far superior understanding and can chime in with something more elegant.

Also, given the nature of routing and switching, the above iptable rule may not work for computers if they are on the same LAN segment as the webserver (since computers on the LAN will be switched instead of routed).

Also, visit DD-WRT - Iptables for a brief guide on further use of iptables. Learn the basic commands and toy around with it until it works to your liking.

Good luck!

Edited by TGT

Thanks TGT!

I'm sure that would work, but i'm unsure of if i want to set up a dedicated server. i know i could run one off of dd-wrt to display a single page, but the other problem is this also needs to be done at another location on a router that doesn't support DD-WRT

I'm trying to help my cousin cut off WAN access daily. right now he's got a schedule in his router that just stops it altogether. we were thinking it would be nice to have a 404-like page come up when you try to attempt to access WAN during this time frame. he runs a wifi hotspot and people all the time complain that 'it's not working' because they are unaware there is a time frame involved.

it's too small of a hotspot to use sputnik or wifidog.... although, it might end up going that way before too long. i like to keep it simple for now, at least

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Remember when the PS2 was banned from export because "its too high tech".. "it could be used for missiles".....
    • Nvidia 610.62 driver lands with big bug fixes and Empulse support by Pulasthi Ariyasinghe There is a new driver available for Nvidia GeForce hardware owners, and it's carrying a whole lot of bug fixes. The WHQL-certified 610.62 Game Ready driver is also adding support for Empulse. Empulse lands from 1047 Games. That may be familiar to first-person shooter fans, as this is the studio that has been behind Splitgate and the Splitgate: Arena Reloaded sequel. This latest FPS entry will land into early access on June 24, and it will have support for DLSS 4.5 with dynamic multi-frame generation and Nvidia Reflex on day one. FIXED World of Warcraft: Gaming stability improvements [5563205] FIXED Apex Legends: Occasional visual corruption after extended gameplay [6239327] FIXED Users may observe DLSS settings being grayed out in certain games after updating to display driver 610.47 [6262805] FIXED Improved gaming stability in multi-monitor configurations when using V-SYNC with DLSS Frame Generation [6158481] FIXED Resolved an issue that could cause jittering or ghosting in some DirectX 11 games when Smooth Motion is enabled [5937897] FIXED Resolved an issue that could cause some games to crash when launched with Smooth Motion enabled [5466398] FIXED [Ada] Resolves a frame pacing issue on certain monitors when G-SYNC is enabled [6226972] FIXED Resolved an issue that prevented the EDID from being read on certain monitors causing them to be identified as "NVIDIA NV-Failsafe” [6005508] FIXED Resolved an issue where certain monitors would not wake from sleep mode [5806798/5635230] FIXED General stability improvements when the system fails to create a new allocation [5449920] Nvidia has only listed a single open issue for this release: “Prefer Maximum Performance” Power Management Mode may not be applied correctly [6007998] The NVIDIA 610.62 driver is now available for download from the NVIDIA app. For those who want to download it directly, standalone links are here. Here are the official release notes (PDF).
    • You could do that in the last 2 updates as well.
    • Bose Ultra Open Earbuds are once again selling at their lowest price by Fiza Ali Amazon is once again offering the Bose Ultra Open Earbuds at their lowest price ever with a limited-time 33 percent discount on their original MSRP, ahead of Father's Day. So, you may want to check it out if you are looking for a gift or if you have been wanting to upgrade your device. The earbuds feature an open-ear design and Bose's OpenAudio technology that should deliver high-quality sound while helping keep audio private. The earbuds also support Bose Immersive Audio, which creates a spatialised listening experience designed to place sound around the listener for a more engaging experience. In terms of wireless connectivity, the earbuds features Bluetooth, Bluetooth Low Energy (BLE), A2DP audio streaming, HFP, AAC, and SBC support. Furthermore, they are compatible with Bose SimpleSync technology, allowing pairing with compatible Bose smart soundbars and speakers. They are also compatible with the Bose App for setup, customisation, and software updates. Moreover, they offer an IPX4 water-resistance rating that should provide protection against sweat and light splashes. When it comes to the battery performance, the Bose Ultra Open Earbuds should provide up to seven hours of battery life on a single charge while a full recharge should take approximately one hour. Specifications Detail Fit type Open-ear Noise cancelling No Microphone Built-in Wireless Bluetooth (A2DP, HFP, AAC, SBC, BLE) Multipoint Yes; 2 devices simultaneously Charging interface USB-C Earbud size 0.73"x0.67" x 1.07" (0.014lb) Case size 1.65"x2.56" x 1.04" (0.097 lb) Materials PC-ABS plastic, metal, silicone, gold plating App support Bose app; adjustable EQ, SimpleSync Audio tech OpenAudio, immersive/spatialized sound Bose Ultra Open Earbuds: $199 (Amazon US) - 33% off Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • After enabling it in about:config, customize, density, compact; the toolbar/address bar gets smaller vertically. I enabled Nova, I notice the tab bar/title bar is a bit larger vertically now? Everything always becomes a waste of space.
  • Recent Achievements

    • One Year In
      Console General earned a badge
      One Year In
    • One Year In
      Twozo Technologies earned a badge
      One Year In
    • One Month Later
      Twozo Technologies earned a badge
      One Month Later
    • Week One Done
      Twozo Technologies earned a badge
      Week One Done
    • Veteran
      branfont went up a rank
      Veteran
  • Popular Contributors

    1. 1
      +primortal
      512
    2. 2
      +Edouard
      190
    3. 3
      PsYcHoKiLLa
      109
    4. 4
      Steven P.
      89
    5. 5
      Nick H.
      71
  • Tell a friend

    Love Neowin? Tell a friend!