We’re rewarding the question askers & reputations are being recalculated! Read more.

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
3answers
18k 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 ...
1
vote
2answers
3k 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 ) ...
3
votes
1answer
997 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 ...
1
vote
0answers
111 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 ...
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 ...
0
votes
0answers
51 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 ...
0
votes
0answers
264 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 ?
1
vote
1answer
243 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 ...
0
votes
1answer
2k 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 ...
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
320 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-...
7
votes
1answer
15k 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 `...
0
votes
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
0answers
91 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....
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
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 ...
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 ...
1
vote
0answers
112 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 ...
1
vote
0answers
462 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 ...
0
votes
1answer
84 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 ...
2
votes
1answer
3k 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 ...
3
votes
1answer
344 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
2k 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 ...
6
votes
4answers
49k 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?
0
votes
1answer
50 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 ...
1
vote
0answers
427 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 ...
0
votes
1answer
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 ...
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 ...
3
votes
0answers
4k 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
1answer
553 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 --...
1
vote
0answers
275 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 ...
3
votes
2answers
16k 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 ...
0
votes
1answer
179 views

Connected to 2 networks cant access the internet

I am sitting with quite a predicament, I am the happy owner of a model B pi running a raspbian lampi distro. The pi is currently running a little php site which connects to a network of devices and ...
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 ...
0
votes
1answer
4k views

After I remove swapfile, I can't do anything! How can I revert this problem?

How can I extend the life of my SD card? I run 2 commands in sudo su mode, and restart my pi. What I run: # swapoff --all # apt-get remove dphys-swapfile # reboot After that, I notice that I can't ...
2
votes
2answers
342 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 $ ...
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 ...
4
votes
2answers
4k 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/...