Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

1
vote
2answers
68 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 ...
0
votes
1answer
97 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 ...
0
votes
0answers
13 views

Debian gateway server with webmin suddenly unable to communicate with anything

I have a Raspberry pi running Raspbian Lite and webmin that is been serving as my home network gateway (and has been for some time without issue). Tonight I was attempting to add some port forwarding ...
4
votes
2answers
126 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 ...
1
vote
0answers
21 views

iptables doesn't recognise REDIRECT as target

Trying to redirect traffic using iptables v1.6 and the following line: iptables -t nat -A PREROUTING -p udp --dport 67 -j REDIRECT --to-port 6767 which results in the following output: iptables: ...
0
votes
0answers
18 views

How can I gain internet access after a valid login? [duplicate]

I set up my iptables on my raspberry pi to redirect ALL traffic to localhost where my landing page is hosted, so that people on my AP can't access internet without logging in(correctly) first. On the ...
0
votes
1answer
232 views

How can I redirect HTTP requests to my captive portal/webserver using iptables

I'm working on a project where we need to use the RPi as a Wifi access point, which I got to work. I can get on the internet through the RPi and can also connect my Apache webserver (which should be ...
0
votes
1answer
80 views

Using the Raspberry Pi and OpenVPN

I have had a burning issue with my VPN setup and I am hoping someone will be able to help, or advise. So I currently have a DD-WRT router with an OpenVPN client setup serving my devices. However the ...
0
votes
1answer
93 views

Raspberry Pi not blocking sites based on iptables rules

I am working on a network security project that can inspect network traffic before forwarding and accepting traffic from the internet. I have a R-Pi B+ Model running raspbian stretch lite where the ...
3
votes
2answers
197 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 ...
1
vote
1answer
73 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....
2
votes
1answer
97 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. ...
3
votes
1answer
973 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 ...
0
votes
1answer
166 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 ...
0
votes
1answer
43 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 ...
1
vote
1answer
263 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
81 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 ...
0
votes
0answers
264 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 ...
0
votes
1answer
243 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 ...
0
votes
2answers
6k 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 ...
0
votes
2answers
585 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 ...
0
votes
1answer
103 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 ...
1
vote
1answer
416 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 ...
1
vote
1answer
245 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 ...
0
votes
2answers
63 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 ...
1
vote
1answer
293 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
0answers
563 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 ...
0
votes
1answer
123 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 ...
0
votes
0answers
509 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 ...
6
votes
1answer
35k 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 ...
1
vote
0answers
91 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 ...
0
votes
1answer
25 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 ...
0
votes
1answer
260 views

Routing network through 3 interfaces

I got a Raspberry Pi 3 which I haven't used in a while, and have decided to boot it up with its built-in wifi card as its own Hotspot, and the official Raspberry Pi Wifi Dongle as an interface to my ...
0
votes
1answer
2k 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-...
3
votes
2answers
664 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) - ...
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
217 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 ?
4
votes
0answers
5k 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 ...
1
vote
1answer
218 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
1k 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

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 ) ...
1
vote
1answer
260 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
12k 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 `...
1
vote
0answers
77 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....
0
votes
1answer
1k 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
1k 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
5k 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
108 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
408 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
79 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 ...