Skip to main content
Share Your Experience: Take the 2024 Developer Survey
12 votes
Accepted

How to open a Raspberry Pi Linux port?

You likely don't have issues with iptables, unless you installed and configured it as it is not running on a default Raspbian install. Also the default install will normally open and listen on the ...
Steve Robillard's user avatar
11 votes
Accepted

iptables: nat table does not exist

Quick guess: You've upgraded the OS and the system has been up for a very long time, or managed to upgrade it without replacing the kernel, because the 4.4.11-v7+ modules have already been removed ...
goldilocks's user avatar
  • 59.1k
10 votes
Accepted

Problem with iptables on buster - neither legacy or nft work

One of those days ... although the pi was recently booted, it seems that it needed a reboot - probably after some update? When I was troubleshooting, I had ls /lib/modules/$(uname -r) ls: cannot ...
Bryan's user avatar
  • 341
8 votes

How to open a Raspberry Pi Linux port?

For me: sudo ufw allow 9999 works, where 9999 is the port number i want to open. Debugging: In case ufw is not installed: sudo apt-get install ufw In case ufw is not running (check with sudo ufw ...
Tonio Liebrand's user avatar
5 votes
Accepted

How to connect a ethernet device(having its own static I.p and netmask) wirelessly by my laptop?

It is a bit unclear how do you want to connect the Laptop to the Raspberry Pi. I will assume that there is no other wifi router as access point running for example to connect to the internet so you ...
Ingo's user avatar
  • 42.2k
4 votes

Edit iptables to open a port the safest and easiest way (nano?)

The problem got solved by using the following commands: sudo apt-get install ufw sudo ufw allow 22 sudo ufw allow 8090 sudo ufw allow 8092 sudo ufw enable sudo reboot And everything was just fine. ...
MeebusJaximus's user avatar
4 votes

Raspberry Pi Wifi Repeater – Block Ads

If you want a more robust setup, you can try pi-hole. It is an open source software package made to block ads network wide, specifically for a Raspberry Pi. Although it can also run on other platforms....
88weighed's user avatar
  • 905
4 votes
Accepted

Pi is listening but nothing except ssh can connect

Your process is listening on IPv6 address ::1 (that's the IPv6 equivalent of IPv4 127.0.0.1 (aka localhost)). You need it to listen on :: (which is IP6ADDR_ANY as that's the IPv6 equivalent of IPv4 ...
Dougie's user avatar
  • 5,321
3 votes
Accepted

Raspberry Pi DHCP Server: clients not getting IP addresses

I've solved the problem. UPDATE: The main issue appears to be in the kernel drivers. Problem solved by upgrading the kernel from 4.14.50-v7+ to the latest stable version (currently 4.14.79-v7+) using ...
Flux's user avatar
  • 279
3 votes
Accepted

Raspberry Pi Wifi Repeater – Block Ads

I've found a solution and created a script to share it. This script will download a list of known domains and block them by using dnsmasq. Those lists will be updated daily. Run ./adblocker.sh --...
jake's user avatar
  • 1,347
3 votes

Iptables and reverse ssh tunnel to connect with IP camera

Why use iptables at all if you want a ssh reverse tunnel? Use ssh -g -f -N -T -R22222:192.168.1.192:80 [email protected] Assuming that 192.168.1.192:80 is the address of your camera and port 22222 is ...
RalfFriedl's user avatar
  • 2,188
3 votes

iptables allow only SSH and VPN

I would like to block all scanners Then disconnect it from the internet. You cannot have it accessible on any port and still hide it from a scanner. The only way to hide it from a scanner and have ...
goldilocks's user avatar
  • 59.1k
3 votes
Accepted

Preventing my rasberry pi 2 from routing traffic over the internet

You can make firewall rules like this; iptables --flush iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -p icmp --icmp-type 255 -j ACCEPT iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ...
user1133275's user avatar
  • 2,216
3 votes

How do I fix iptables -L error: operation not supported

Had the same problem... apparently you were using netfilter and after the upgrade the iptables command is pointing to the new nftables (https://askubuntu.com/questions/1295021/warning-iptables-legacy-...
iceburn_pt's user avatar
3 votes

is iptables broken or is it a kernel related issue?

I managed to get this to work with a workaround by replacing iptables with iptables-legacy (mainly to get ufw working) You will need to do the following: sudo touch /run/xtables.lock sudo chmod a+r /...
B0b's user avatar
  • 31
2 votes
Accepted

Inverting iptables interfaces

! is a special bash character for history expansion and has to be escaped. The exclamation mark needs to be escaped in single quotes ' and the position is before the interface name, not before the ...
Thomas Weller's user avatar
2 votes

Edit iptables to open a port the safest and easiest way (nano?)

Chain INPUT (policy ACCEPT) TARGET: Accept, PROT: tcp, OPT: --, SOURCE: anywhere, DESTINATION: anywhere, tcp dpt: 8092 Chain FORWARD (policy ACCEPT) Chain OUTPUT (policy ACCEPT) As per Steve's first ...
goldilocks's user avatar
  • 59.1k
2 votes

How to redirect IP network to specific interface

Usually you should have a route for each interface similar to this, assuming your default gateway is 198.168.1.1 (your internet router?) and the ip address from the wlan0 interface is 10.110.2.30: ~$ ...
Ingo's user avatar
  • 42.2k
2 votes

Forward port (80) to another local network IP

Unless the PI is also the default gateway for the camera, you should use some connection forwarding like xinetd or rinetd or socat. To configure xinetd, create a file /etc/xinet.d/camera_forward and ...
RalfFriedl's user avatar
  • 2,188
2 votes

How to configure RPI as access point?

If you want to make a bridge : http://blog.ithasu.org/2016/10/using-a-raspberry-pi-3-as-a-wifi-access-point-and-bridge/ hotspot : https://github.com/pihomeserver/Kupiki-Hotspot-Script A bridge is ...
doom's user avatar
  • 131
2 votes
Accepted

How to allow access from OpenVPN set on eth0 to wlan0

Because we have access to the router I will use clean routing, not using NAT. This way we have control about communication in both directions and can use advanced routing if needed. You have a ...
Ingo's user avatar
  • 42.2k
2 votes
Accepted

PiVPN client cant connect to local network

It seems you are missing a route somewhere. If you want to reach 192.168.30.10 from an external VPN client, you need the correct routing entries on every step along the way, and on the way back. I ...
RalfFriedl's user avatar
  • 2,188
2 votes
Accepted

Need help for iptables/filter

After this filter is applied I cannot connect to my access point. It fails to obtain IP. As in, the AP fails to get an IP or what you are trying to connect? I'll assume it's the latter. I tried to ...
goldilocks's user avatar
  • 59.1k
2 votes

How do I fix iptables -L error: operation not supported

You are doing many things wrong. You have first to update the package list before upgrading them. Then you should better use apt full-upgrade instead of only simple apt upgrade. rpi ~$ sudo apt ...
Ingo's user avatar
  • 42.2k
2 votes

Redirecting Traffic to local mqtt server

The FORWARD rule is passing packages to the destination, but the packages returning to the source is probably dropped. You should post the complete listing of the rules to make a more precise answer. ...
Mats Karlsson's user avatar
1 vote

Raspberry Pi not blocking sites based on iptables rules

I finally solved this issue. I got a hint from How does 'iptables rules table' work with hotspot? Plus, i inserted the new rules to the top of the FORWARD CHAIN so that they will checked ...
Abdirahman Mohamed's user avatar
1 vote

RaspberryPi VPN Router (eth0) works in Wired connections but not in Wireless ones

in short: set static route in internet router to VPN router (RasPi) set default gateway on Testmachine 2 to internet router optional: set default gateway on Testmachine 1 to internet router detailed: ...
Ingo's user avatar
  • 42.2k
1 vote

VPN Passthrough two ethernet interface

Here I have made an ascii art how it should work. 10.10.10.2 +----------+ 10.10.10.1 / ...
Ingo's user avatar
  • 42.2k
1 vote

Can't ping certain devices on my network

Is it a problem with some sort of configuration on the Pi or is it on one of the APs parts? I'm presuming the ping fails because it times out, and not because of a firewall you've set up (if it were ...
goldilocks's user avatar
  • 59.1k

Only top scored, non community-wiki answers of a minimum length are eligible