DD-WRT and iptables – blocking outgoing access to specific IPs

Recently my Malwarebytes informed me one of my programs was trying to reach out to a questionable IP. First, I’m glad I have Malwarebytes installed; it’s free, but I purchased a three-pack lifetime subscription which gets you automatic updates rather than you having to manually update. I didn’t mind manually updating, but it’s situations like this which made me decide to donate to the cause.

Anyhow, while working on cleaning up the malware, I wanted to ensure I wasn’t sending anything to the IP (which happened to originate in China. Big surprise there.)

I have a DD-WRT enabled wireless router, which permits iptable rules. In my case you can temporarily enter the rule in the command prompt under the “Administration” tab in DD-WRT to test it out. The rule goes into effect immediately, but only lasts until the next reboot. So if you want it to be permanent, after you test it out you can write it to the firewall in the same tab.

So here are some key rules you can enter to block outgoing traffic.

1) Block outgoing access to an IP without logging (replace the example IP below with an IP of choice):
iptables -I FORWARD -d 219.151.246.14 -j DROP

2) Block outgoing access to an IP *with* logging (replace the example IP below with an IP of choice):
iptables -I OUTPUT -d 219.151.246.14 -j logdrop

3) List all IPTABLES rules with number of rule that include the FORWARD command (you can replace the FORWARD command with any command you want the rule list to include):
*this is in case you made a mistake, or want to remove a rule you no longer need*
iptables -vnL FORWARD --line-numbers

4) Delete an IPTABLES rule referencing FORWARD by number (replace X with the number of rule you listed in #3 above):
iptables -D FORWARD X

Mouse button / touchpad button response has delay after typing (Windows 8+/Windows 10)

Many people using laptops with touchpads for gaming (even just Facebook) complain about not being able to press keys and move their “player/character” with the touchpad simultaneously.

This is not the same problem.

The problem about being able to (for example) press the “W” key to move forward, while changing direction using the touchpad is typically a driver issue, where the touchpad is disabled automatically when they keyboard is used. The intent is to prevent inadvertent movement of the cursor by the typist if his/her hand accidentally brushes the touchpad while typing. This problem is (relatively) easily fixed by unchecking the “disable touchpad while typing” setting in your touchpad’s settings.

Recently my son noticed on Minecraft that there was a new problem. When he would be using the keypad to move, or even for a half-second after he quit using the keys, the mouse buttons would be non-responsive. This has significant detrimental effect in any player-vs-player (PvP) or first person shooter (FPS) game. (OK – any serious gamer isn’t using a touchpad, but this is Minecraft.)

The answer wasn’t anywhere in the touchpad driver settings. It is a Windows 8 / WIndows 8.1 “fix” for us. (Thankssssss for that.)

The solution is

  1. Go to “Settings” (move your mouse to the upper right corner, then click on the Settings charm),
  2. At the bottom of the screen section for Settings, click on “Change PC Settings.”
  3. Now click on “PC and devices” (should be near the top left in the PC Settings window.
  4. Click on “Mouse and touchpad” (about halfway down the left side settings in the PC and devices window.
  5. On the right, typically the last selection is labeled “Touchpad.” Under there is a sentence that reads ” To help prevent the cursor from accidentally moving while you type, change the delay before clicks work.”  Yeah. Because I’m always banging my keys so hard that I mash the mouse buttons too. Anyhow, change the box below it to “No delay (always on)” to fix this…fix that Microsoft blessed us with.

MouseClickDelay-1024x558

Free SMTP service (no credit card needed) for server emails

I wanted my RocketRAID card and WSUS server to email me with any issues on my RAID array. I don’t run an email server, so I needed to find an SMTP service. I tried Gmail, but it only works if you can enable SSL, which you can’t with those devices.

But I tried SMTP2GO and it works great. 20 emails a day for free, or you can pay $5/month for 2000 emails/month (Pricing examples here: SMTP2GO pricing.)

It suggests port 2525 since some ISPs block outgoing port 25 for home accounts, but you can use ports 2525, 8025, 587 or 25 using the default SMTP settings they give. You can even use port 80 if your ISP really sucks by using SMTP server: port80.smtpcorp.com.