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
8
votes
1answer
17k 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 `...
8
votes
2answers
68k views

How to open a port?

I need to open the 25 TCP port on my Raspberry Pi 3, I watched videos on the internet (iptables) nothing works, if you have a solution, using iptables or another method, that would be great. If you ...
6
votes
4answers
52k 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?
6
votes
2answers
5k 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 ...
5
votes
1answer
1k 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 ...
5
votes
0answers
7k 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 ...
4
votes
2answers
297 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 ...
4
votes
3answers
7k 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 ...
4
votes
3answers
19k 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 ...
4
votes
2answers
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/...
4
votes
1answer
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 ...
4
votes
1answer
3k 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 ...
3
votes
2answers
18k 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 ...
3
votes
2answers
4k 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://...
3
votes
1answer
383 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 ...
3
votes
1answer
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 ...
3
votes
1answer
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 ...
3
votes
1answer
196 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 ...
3
votes
0answers
6k 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 ...
3
votes
0answers
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 ...
2
votes
2answers
18k 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 ...
2
votes
1answer
485 views

How to allow access from OpenVPN set on eth0 to wlan0

So I have the following configuration: +---------------------+ +----------------------------------+ | 10.10.10.* | | 192.168.100.*...
2
votes
2answers
594 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 ...
2
votes
1answer
4k 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 ...
2
votes
2answers
349 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 $ ...
2
votes
1answer
159 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). ...
2
votes
2answers
4k 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 ) ...
2
votes
1answer
577 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 --...
2
votes
1answer
350 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. ...
2
votes
2answers
894 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) - ...
1
vote
1answer
176 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 ...
1
vote
1answer
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 ...
1
vote
1answer
108 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 ...
1
vote
1answer
1k 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 ...
1
vote
2answers
356 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 ...
1
vote
1answer
329 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 ...
1
vote
1answer
415 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-...
1
vote
2answers
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) ...
1
vote
1answer
7k 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 ...
1
vote
1answer
84 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 ...
1
vote
1answer
2k 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 ...
1
vote
1answer
218 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 ...
1
vote
1answer
31 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 ...
1
vote
1answer
276 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 ...
1
vote
1answer
2k views

Can't access to ssh after configure OpenVPN Client

I followed a guide to configure my raspberry to connects to PureVPN server following this guide : How to Setup PureVPN on Raspberry Pi. I Followed the part regarding OpenVPN. After the configuration ...
1
vote
1answer
1k views

Specify port number with hostname

I think its not possible but Is there a way to specify a port for IP addresses listed in the etc/hosts file. If not, how to solve this: working url: http://raspberrypi.local:1234/mypage but if I ...
1
vote
1answer
5k views

RaspBMC and OpenVPN: block traffic except VPN with IPTables

Current status: OpenVPN is up and runnning, ifconfig shows eth0, lo, tun0. To be achieved: Temporarily blocking all traffic via calling a bash script except all traffic in home network and all ...
1
vote
1answer
190 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 ...
1
vote
0answers
16 views

connecting a LAN device to openvpn through raspberry pi network bridge

hi i have recently set up a raspberry pi to be a network bridge for my router to my room as i thought it would be quicker to do than wait for the delivery of a plug in network adapter in this lock ...
1
vote
1answer
221 views

How to setup my Pi to proxy all LAN traffic through wifi?

I am quite new to linux and Raspberry Pi world and networking in general. I would like to add a VPN on my Pi, connect my XBOX to my Pi using LAN and have it act as a gateway of sorts so my XBOX is on ...