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

Questions tagged [iptables]

is a user-space application to configure the Linux kernel firewall tables. These tables contain chains of rules defining the treatment of network packets.

Filter by
Sorted by
Tagged with
16 votes
4 answers
167k views

How to open a Raspberry Pi Linux port?

I need to open TCP port 25 on my Raspberry Pi 3. I watched videos on the internet re. iptables, nothing has worked. If you have a solution, using iptables or another method, that would be great. If ...
Millefeuille's user avatar
9 votes
2 answers
9k views

Raspberry Pi DHCP Server: clients not getting IP addresses

I am relatively new to networking, so please bear with me. For a purely educational project, I've set up a network where the Raspberry Pi 3 running Raspbian Stretch is to function both as a router and ...
Flux's user avatar
  • 279
8 votes
1 answer
18k views

iptables: nat table does not exist

I'm trying to do some NAT on my Raspi 2 running Raspbian. But when I try to do anything with the nat table in iptables, I get the following error: iptables v1.4.21: can't initialize iptables table `...
Cnly's user avatar
  • 183
8 votes
1 answer
12k views

Problem with iptables on buster - neither legacy or nft work

I recently installed buster on a Pi 3 Model B. Trying to setup a von (using pivpn) I realised that iptables is not working. I've learned that there's legacy mode and nft. Here's part of the output ...
Bryan's user avatar
  • 341
7 votes
1 answer
10k views

Open Splash Page After Connecting to Wifi Hotspot

I'm using my pi3 to display a local "website" as described here Making a Raspberry Pi 3 accessible w/o configuration via WiFi and static IP/URL. Therefore, I'm creating a hotspot with the pi. This ...
Andi Giga's user avatar
  • 543
6 votes
4 answers
58k views

How can I disable raspbmc's firewall for SSH access?

I want to be able to SSH into my Raspberry Pi from an external IP address. Right now, this doesn't work, due to raspbmc's firewall. How can I disable this firewall?
Exeleration-G's user avatar
4 votes
2 answers
24k views

How to restore the original iptables configuration?

I use RaspBMC as OS which stores its "persistent" iptables configuration in /etc/network/if-up.d/secure-rmc and I presume it's applied when the eth link goes up (e.g. after boot). If I futz with the ...
Cristian Diaconescu's user avatar
4 votes
2 answers
565 views

Raspberry Pi Wifi Repeater – Block Ads

I configured my raspberry pi as a wireless repeater (using hostapd and dnsmasq). Now I wonder how I could use it to block known ad-servers? What would be the best way? Using iptables? Or setting up ...
jake's user avatar
  • 1,347
4 votes
3 answers
8k views

Performance of a raspberry pi as a firewall

I am thinking of setting up a raspberry pi inside a private network to act as a firewall for all incoming/outgoing traffic in that network. The idea would be to have a router connected to the network ...
ByteFlinger's user avatar
4 votes
3 answers
20k views

How to make Pi an AP with 2 WiFi adapters?

I got a question. How to make Pi to be an AP with 2 wifi adapters, one wifi adapter is used to connect to the router, and another one is used to be an AP ? How to do this ? By the way, I have ...
user11257's user avatar
4 votes
2 answers
6k views

RPi as Internet Gateway/Bridge

Can I use RPi as Internet Gateway/Bridge, with the possibility to control the network bandwidth depending upon local IP? I would like to setup as follows, and I tried the tutorial at http://...
Snazzy Sanoj's user avatar
4 votes
2 answers
5k views

Configure the port knocking server (knockd)?

I'm trying to configure port knocking on my RasPI running Raspbmc, using knockd. Here's what I've done: sudo apt-get update sudo apt-get install knockd ...then edited the files: /etc/default/...
Cristian Diaconescu's user avatar
4 votes
1 answer
5k views

is iptables broken or is it a kernel related issue?

I am trying to setup an access point on a raspberry pi 3 v1.2 using this repository create_ap with this Wifi adapter Bus 001 Device 005: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n ...
weedcookie's user avatar
4 votes
1 answer
1k views

IPv4 forwarding from RPi 2 to RPi Zero via OTG cable

I am trying to use my Raspberry Pi Zero together with my Raspberry Pi 2 and I want to share network access from my Raspberry Pi 2 to my Raspberry Pi Zero. I can easily create a local network ...
Linus's user avatar
  • 529
4 votes
1 answer
2k views

Routing ethernet connection over WiFi [duplicate]

I have a situation which requires routing the connection from wlan0 to eth0 over the same network. The reason behind this, is that I would want to be able to connect to a device connected to the RPi ...
Taha's user avatar
  • 51
4 votes
1 answer
6k views

VPN Passthrough two ethernet interface

I'm a quite new in the network my internet acces have a proxy so to by-pass it I use a VPN hosted on my VPS. I use the OpenVPN Client software for all my devices. (Windows, Android, Linux) I got a ...
Misteralex007's user avatar
3 votes
2 answers
766 views

How can I activate UFW on my Raspberry Pi 3 B without risking to lock myself out?

I want to activate UFW on my Raspberry Pi 3 B as I have used it previously on another machine and was quite content with that software. I have already downloaded UFW but I need to make sure that I ...
Vesa's user avatar
  • 247
3 votes
1 answer
431 views

VPN + IP Route headaches

I followed a guide here to turn my raspberry pi into a vpn router for my PS3. Basically it uses the Wi-Fi connection of the Pi to share internet to the ethernet connection. It works perfectly on one ...
sapplicator's user avatar
3 votes
1 answer
733 views

OnionPi - No internet connection after adding Iptables rules

I need some help or advices since I've not know what could I do to fix this issue. I've built an onion pi following the adafruit tutorial. This basicly is a wifi hotspot that routes all traffic ...
Inboca's user avatar
  • 41
3 votes
2 answers
6k views

SSH connection refused via ethernet cable

I try to connect to my Raspberry Pi from my Mac via an ethernet cable. I get: ssh: connect to host 169.254.32.96 port 22: Connection refused. Nmap says this: Starting Nmap 7.12 ( https://nmap.org ) ...
KevinS's user avatar
  • 33
3 votes
0 answers
7k views

Setting up a Huawei LTE stick e3372 on a raspberry

I have just taken over a project from a colleague so I am not 100% sure what this pi have been up to before. Anyways, my task is to setup a Huawei LTE usb Stick (E3372) as a modem for the raspberry ...
jimmy's user avatar
  • 131
3 votes
0 answers
5k views

Trying to use Pi as a bridge between 3G dongle and Ethernet [closed]

I don't have a lot of experience with Linux, but I was hoping I'd be able to use my Raspberry Pi to share a 4G dongle's internet connection with my main router. Unfortunately I haven't quite managed ...
James's user avatar
  • 131
2 votes
2 answers
31k views

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

I have this web application called HaasBot (running on Mono 5) which I want to run on my Raspberry Pi 3 with Raspbian Stretch Lite (Terminal only!) as a server internally in my network only. Using SSH ...
MeebusJaximus's user avatar
2 votes
2 answers
3k views

nat in the iptables is not recognized

I am trying to set up my Raspberry Pi as a Man In The Middle device to monitor devices on my home network. When I try to forward port 80 to port 8080 (to allow the webpage to be loaded on the device) ...
user avatar
2 votes
1 answer
3k views

Multiple OpenVPN clients on Raspberry Pi

I have a cute Raspberry Pi 2 router running Raspbian Jessie. It connects to a VPN using OpenVPN on tun0 and redirects all the wireless (wlan0) traffic into tun0. This is done by using these iptables ...
Alessandro Cappello's user avatar
2 votes
1 answer
1k views

How to allow access from OpenVPN set on eth0 to wlan0

So I have the following configuration: +---------------------+ +----------------------------------+ | 10.10.10.* | | 192.168.100.*...
licaon's user avatar
  • 23
2 votes
1 answer
5k views

How to forward traffic from tun0 to specific IP behind eth0 (iptables)

My raspberry pi is connected to a OpenVPN server on interface tun0. The internet connection is setup over a 3G/UMTS mobile stick(eth1). How can I forward all traffic coming from tun0 to a device with ...
fabrisodotps1's user avatar
2 votes
2 answers
363 views

Write current IP adress eth0 to a file

I need to store the current IP adress of my Raspberry Pi into a file. Can someone tell me how to do this? The goal is to create a file in /var/www/ipadress.txt with this content: 192.168.0.28 $ ...
s3bi's user avatar
  • 160
2 votes
1 answer
407 views

AP Bridge VPN IPTABLES rules needed

I have set up an access point with a bridge (bridge: I want to be able to access all other devices within my network) using this How-To (Setting up a Raspberry Pi as an access point - the easy way). ...
Georg's user avatar
  • 31
2 votes
1 answer
672 views

Problem with iptables - can't DNAT or use --dport

I have been having a few frustrating hours trying to get iptables to work. I have updated and upgraded my raspbian. I have iptables V1.4.14 installed. # iptables -A INPUT -i eth1 -p tcp -m tcp --...
Bryan's user avatar
  • 341
2 votes
1 answer
592 views

How does 'iptables rules table' work with hotspot?

I'm using iptables rule for censorship. I created hotspot.When I try to connect website on raspberry with mother network, It's working. But I try on pc with hotspot my iptable rules isn't working. ...
a.gulcan's user avatar
2 votes
2 answers
958 views

Issues with WiFi-WiFi Tor Proxy

Background I am currently trying to build a portable Tor Router on my Raspberry Pi 3. So I have my Pi 3 with two wireless interfaces, one is a station and the other is an AP. wlan0 (station) - ...
Nicholas Adamou's user avatar
1 vote
2 answers
7k views

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

I have all the newest software. Downloaded the official image yesterday. apt-get upgrade apt-get update rpi-update ..... rebooted, of course Does not help. root@raspberrypi:/home/pi# iptables --...
cybernard's user avatar
  • 196
1 vote
1 answer
240 views

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

I have a device which is used to monitor analog sensor data(Micron optics sm130 ) with ethernet port available. It has Static IP as 10.0.0.126 Netmask as 255.255.255.0 DHCP server disabled Its ...
bandejiya's user avatar
  • 133
1 vote
1 answer
2k views

iptables allow only SSH and VPN

I have my Pi 2 with a public IP address and I would like to protect it. I would like to have access only to SSH (public/private keys), openVPN, services that are requested from the pi itself, such as ...
john's user avatar
  • 131
1 vote
1 answer
259 views

Need help for iptables/filter

Setup: RPi connected to router using ethernet on subnet 192.168.0.0/24 which is also an access point access on subnet 192.168.43.0/24 So basically devices will connect to my Rpi for VPN traffic I ...
Arahasya's user avatar
1 vote
1 answer
5k views

PiVPN client cant connect to local network

I've managed to setup PiVPN on a Raspberry Pi 3+ and I can connect from the outside, I even have Internet access, but I don't have access to the local network. These VLANs are created under my USG ...
jtomasrl's user avatar
  • 113
1 vote
2 answers
760 views

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

I have a device which is used to monitor analog sensor data(Micron optics sm130 ) with ethernet port available. Its works fine if If I connect it with my laptop using ethernet cable and by configuring ...
bandejiya's user avatar
  • 133
1 vote
1 answer
345 views

How to configure RPI as access point?

All my life, I've been using Adafruit tutorial on How to set PRI as access point, but in the latest release the /etc/network/interfaces file looks diffrent. After following tutorial and reboot, RPI ...
ktototaki's user avatar
1 vote
1 answer
730 views

Inverting iptables interfaces [closed]

I'm building a LAN to WLAN router and I need setting up NAT using iptables. I don't get the description of the -i and -o command line switches (emphasis mine) in the MAN page: [!] -i, --in-...
Thomas Weller's user avatar
1 vote
1 answer
8k views

Fedora - iptables rules change after reboot, iptables-save do nothing

So I'm setting a new fedora install on my raspberrypi (version: newest pidora). Everything works, except vnc, any connection attempts are rejected. So, as I'd like to make it working now and worry ...
user avatar
1 vote
2 answers
518 views

Can’t ping or mtr ipv4 when ufw enabled

These don’t work when I have ufw enabled: ping 8.8.8.8 mtr -n 8.8.8.8 Ping just hangs and the mtr command immediately spits out the confusing message, mtr: Permission denied. IPv6 works fine: ping ...
danorton's user avatar
  • 113
1 vote
2 answers
574 views

Can't access other devices over network, only via router unit

I recently set up my Raspberry Pi to act as a router. All is working well when it comes to connected devices accessing the internet. The problem is that my computers don't seem to be allowed/capable ...
Rydberg1995's user avatar
1 vote
1 answer
605 views

Use the RPi3 with Libreelec to route between 2 networks

I'm using Libreelec on a RPi3 and I would like to use it to route between eth0 and wlan0 too. Network A - 192.168.0.0/24 with Internet access, connected to eth0, my network Network B - 192.168.1.0/24 ...
virtualdj's user avatar
  • 133
1 vote
1 answer
416 views

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

I have this following setup: Office Network: 192.168.9.x --> Subnet for all Wired Connections 192.168.9.1 --> Wired Gateway IP 192.168.10.x --> Subnet for all Wireless Connections 192....
JVS's user avatar
  • 11
1 vote
1 answer
4k views

Can't ping certain devices on my network [closed]

I've got a rather odd problem. The Raspberry Pi is connected fine to the internet i.e. I can ping google.com and browse the web without any problem. However, the problem for me is that I am unable to ...
Tom's user avatar
  • 151
1 vote
1 answer
437 views

Make a program to run on a specific network interface?

Short question: How can you make only one specific program run off wlan0 and leave everything else to run off the ethernet? Long question: I've been using my Raspberry Pi for a while now and I love ...
Tom's user avatar
  • 151
1 vote
1 answer
39 views

Correctly Route 2 Newtorks

I am currently running Pidora and I have configured it so that dhcpd hands out an IP address to devices connected via Ethernet on a network of 192.168.2.1 whilst it (the Pi) obtains a static IP from ...
J.Evs's user avatar
  • 21
1 vote
1 answer
369 views

Using Pi as a router doesn't Internet - funky iptables?

I'm using this Adafruit guide for turning my Raspberry Pi 2 B+ into a wifi router. I've got all the software installed and it works! Well, sort of. I can connect to the router A-OK, and if I run ...
Wayne Werner's user avatar
1 vote
1 answer
4k views

Raspberry pi has ip address, not connecting to internet

I have my raspberry pi running on raspbian jessie lite. I have created a hotspot on my windows machine and connected my raspberry pi to the hotspot. The pi has got an ip address assigned to it, but ...
seetharaman's user avatar