Redirect all websites to a single webpage using iptables

I have a router which runs busybox, it has iptables so i wanted to redirect all webpages clients request to a single webpage. I cant use hosts file because the /etc folder is mounted as read-only. Is it possible to do that using iptables? Im new to both linux and networking so please try to … Read more

Chroot on startup

I have a script that runs on startup, but it wont launch a application in chroot. #!/bin/sh /usr/sbin/chroot /root/chrootdir/ /bin/sh -c “lighttpd -f /etc/lighttpd.conf -m /lib” echo “script activated” >> /log/www.log the log file is written/appended on startup, but the lighttpd server is not starting. Running the script when the box is running works fine … Read more

transparent proxy with squid3 dansguardian iptables and one nic

I am attempting to filter my home internet connection through transparent proxy (squid3) and dansguardian . I have the following setup: http://i.stack.imgur.com/5Z3DP.png My Ubuntu Server is connected to VDSL directly, just like any other computer in the network. My consumer grade VDSL (192.168.2.1) is ZTE all-in-one device (DHCP server, router, wireless access point, switch, etc.) … Read more

switch_root not included in initramfs image

After upgrading the kernel via yum to the latest version the initramfs image file is missing the switch_root binary from the /sbin/ folder. This causes the machine to not boot, from this kernel. Adding the file back into the initramfs manually using this guide: http://www.thegeekstuff.com/2009/07/how-to-view-modify-and-recreate-initrd-img/ The machine will then boot from the new kernel. Upgrading … Read more

EC2 Booting an EBS-backed AMI instance gives a kernel panic

TLDR: I’m trying to create an EBS-backed AMI instance and then pivot to it using Busybox but I get a kernel panic: VFS: Mounted root (ext3 filesystem) readonly. Freeing unused kernel memory: 156k freed Kernel panic – not syncing: No init found. Try passing init= option to kernel. The repository for the code is here: … Read more

busybox: watchdog – logging

I’m trying to debug a reboot of an embedded device and suspect watchdog might be involved but cannot find any logs. I also cannot find the watchdog.conf anywhere. The device is available at /dev/watchdog Does watchdog log events to anywhere? Can I make it? I’ve also read that it I should be able to find … Read more

Use deadline I/O Scheduler on BusyBox v1.16.1

Does anyone know how to add / make available the deadline I/O schedulers on BusyBox v1.16.1 ? The only two I see when I run “cat/sys/block/sda/queue/scheduler” is as follows: [noop] cfq My understanding is that there are two more… anticipatory and deadline, but I don’t know how to enable / install them. Thanks Answer This … Read more