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
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
0 votes
1 answer
2k views

Iptables and reverse ssh tunnel to connect with IP camera

I need to be able to access an IP camera that is on the same local network as a raspberry. I do not have access from the outside because it is a mobile data network that does not give me public IP or ...
crossmax's user avatar
  • 303
0 votes
1 answer
449 views

Forward port (80) to another local network IP

I have a Rpi, which is behind NAT (4G carrier), but I've managed to expose ports to be accessible from the internet using https://www.remot3.it. I want to use the Rpi as proxy, so I can access a IP ...
d.popov's user avatar
  • 101
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
406 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
0 votes
0 answers
633 views

Raspbian Stretch iptables: Can't redirect all requests to localhost on pi

I have a private hotspot running on the raspberry based on RASPAP, which is working perfectly. Now I wish to automatically direct all the users who connect to this wifi towards a locally hosted ...
Mohsin Anees's user avatar
0 votes
1 answer
556 views

Faking an internet connection on an access point

I'm working on a project where a Raspberry Pi creates its own access point running a Flask server, but will not have an internet connection. I set up the iptables so that when the user tries to ...
Andrew Langley's user avatar
2 votes
2 answers
30k 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
0 votes
2 answers
2k views

How to redirect IP network to specific interface

I'm developping an app for Android Things DP4 on Rpi3. I need my Rpi to send packets with destination IP in the network 10.110.2.0 with the interface wlan0 and packets with destination IP in the ...
Maskim's user avatar
  • 133
0 votes
1 answer
2k views

Windows Ping Problem

I seem to be having a strange problem with my Raspberry Pi - I can ssh to the Pi, but the Pi cannot ping the computer I am ssh'ing from (Windows firewall allows ICMP packets). I have the Pi configured ...
Billy Kalfus's user avatar
3 votes
2 answers
747 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
1 vote
1 answer
504 views

Prevent traffic from specific IP from routing through OpenVPN

I am using a Raspberry Pi 3 as a WiFi access point, which routes all traffic through the tun0 interface/OpenVPN. However, I'd like to be able to route traffic from a device with the IP 172.24.1.126 on ...
Zaden's user avatar
  • 11
0 votes
2 answers
224 views

Give fix bandwidth to all ip address for internet, but exclude local apache server

I have installed chilli, apache2, hostapd in raspberry pi. User can connect hostspot created by hostapd. Captive portal will open asking id password(because of chilli). Once user sign in, user ...
hardik sharma's user avatar
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
0 answers
2k views

cannot forward from wlan interface to another wlan interface

I have two wlan interfaces: wlan0 wlan1. wlan0 is an AP managed by hostapd, where as wlan1 is a normal wifi interface, which is connected to my home router via wpa_supplicant. Additionally I have my ...
Scrumplex's user avatar
  • 123
0 votes
1 answer
574 views

Can only SSH using Wi-Fi connection not Ethernet

I have a Pi connected to both Wi-Fi and a cellular gateway but can only SSH into it from the Wi-Fi IP address. Port forwarding is, as far as I can tell, correctly set up on the cellular gateway. I ...
Murenrb's user avatar
  • 103
0 votes
0 answers
865 views

Raspberry Pi 3 WiFi to WiFi Access Point not forwarding traffic to Internet

I followed this guide https://pimylifeup.com/raspberry-pi-wireless-access-point/ on how to setup an Ethernet to WiFi access point using the built in RPi WiFi adapter successfully. I connected my phone ...
chrislacey's user avatar
15 votes
4 answers
156k 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
1 vote
0 answers
178 views

FTP connection broken after configuring iptables on Raspbian

So I managed to get a configuration of iptables that suits my needs, primarily based on 2+ hours of research and reading similar Stack Exchange and forum posts. However, this seems to have broken my ...
ThatGuy's user avatar
  • 111
1 vote
1 answer
38 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 votes
1 answer
3k views

Error installing iptables-persistent

I tried to install iptables-persistent without success. I checked the dependent packages and tried to install them manually but it is also not working. What I tried: sudo apt-get install iptables-...
Pedro Rio'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
0 votes
0 answers
149 views

Steps required to protect home network from Raspberry PI infected with malware or hacked? [duplicate]

I'm not to savvy with network security so I hope someone can help me. My question is reformulated here to be more precise, something that was requested by other members in the previous question. I ...
MFJC's user avatar
  • 235
0 votes
0 answers
343 views

Only allow ssh from 192.168.XXX.XXX

How can I only allow ssh access from the local network (192.168.X.X) and drop all requests from the internet? What is the best option? adding an iptables rule or modifying the /etc/hosts.allow ?
ECII's user avatar
  • 161
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
  • 533
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
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
1 vote
1 answer
698 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
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
1 vote
0 answers
122 views

Is there a way to set up a tor-ap and be able to turn tor routing off when needed?

I recently turned my raspberry pi into an AP and am wanting to follow the directions here https://learn.adafruit.com/onion-pi/overview. However, after reading the section here https://learn.adafruit....
chaoticslacker's user avatar
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
3k 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 ...
Federico's user avatar
  • 143
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
1 vote
0 answers
132 views

rPI access point devices can't see upnp devices, but can access by ip. Missing iptable or incorrect interface setup?

I posted yesterday, but forgot my login, sorry guys :( I setup a basic wireless access point to access my ethernet network from my wifi devices not near it. I can access devices by ip just fine, but ...
user1120389's user avatar
1 vote
0 answers
518 views

forwarding ports from eth0 to wlan0

I have a raspberry pi 3 which is set up as a wifi ap using hostapd and dnsmasq sharing the eth0 which is connected to an ADSL modem. My laptop is connected to this wifi ap. I have set up vnc servers ...
Jonathan Smith's user avatar
0 votes
1 answer
139 views

Preventing my rasberry pi 2 from routing traffic over the internet

I have my raspberry pi 2 connected via Ethernet to our router which is connected to the internet. The Pi 2 is used as a media server but I would like to be able to ssh to the pi 2 and disable and ...
Rick T's user avatar
  • 103
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
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
  • 519
3 votes
1 answer
427 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
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
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
1 vote
0 answers
719 views

Raspberry Pi Tor router without WLAN

I have Raspberry Pi 1 model B+ with Raspbian Wheezy. I bought a USB2-Ethernet adapter and decided to create hardware Tor routing. What I mean by hardware routing: The Raspberry Pi will be in middle ...
Avaruuskadetti's user avatar
0 votes
1 answer
58 views

RPi B+ with WiFi clients

I have my RPi B+ "working" as a Wireless Router, except for the routing part. I can associate to the WLAN0 side of the RPi but traffic doesn't go through to the eth0 side. Routing Table: Kernel ...
Onyxdragun's user avatar
1 vote
0 answers
551 views

10 second delay on Post Request from Midori with node backend server

I have a RaspberryPi that runs a small web-application on it. It is auto-loaded on boot in midori (kiosk mode) and a small timer runs on it (updated every second). This works all right. Now, the ...
SebasZil's user avatar
  • 175
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
0 votes
1 answer
5k views

Opening ports with iptables

I'm imaged sd card with latest version of Raspbian : http://downloads.raspberrypi.org/raspbian_latest This comes with version of iptables. However there are no rules configured. Do I need to add a ...
blue-sky's user avatar
  • 327
1 vote
1 answer
2k 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 ...
szuniverse's user avatar
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
1 vote
0 answers
293 views

Raspbian can't forward port to a ip in lan

I have a problem: I have a DVR connected to my router and I want to access it from remote but in my country there aren't ISP that offers free ports. So I bought a Raspberry Pi, connected it to Hamachi ...
alex3850's user avatar