Questions tagged [iptables]

iptables allow creation of rules to define packet filtering behavior.

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

How to read ip and port from text file and put in firewall

I decided to use iptables and ipset to read text file that contains source ip and destination port. I want to drop these flows. Is it possible and how to write command to perform this? The file is: ...
3
votes
0answers
32 views

SSH with MAC based filtering using iptables - recommended?

I have a server in an internal network (login there via VPN) from where I login to the server via SSH with OpenSSH public/private key authentication. From a security point of view, I want to tie the ...
0
votes
0answers
5 views

IP Tables - Block incoming DNS requests except from list of IPsH, but do not block outgoing DNS

Here is what I have, but it seems to block outgoing dns as well. Additionally I am trying to add more than 1 ip to whitelist. # Whitelisted IP REMOTE_IP="32.79.97.102" # Flushing all rules iptables -...
1
vote
1answer
16 views

Does upset hash:net,port support 0.0.0.0/0

Is there a way to add 0.0.0.0/0 to ipset type hash:net,port? It appears to only support prefix lengths of 1-32 but what if I want an entry in my ipset hash to support all ip traffic on a given port? ...
0
votes
0answers
15 views

ionos server - listen on port 3001

I want to listen on a port 3001 for node application server server.listen(3001, "0.0.0.0", () => { console.log("listening 3001"); }); The server is lauched correctly but don't recieve ...
0
votes
0answers
7 views

How to setup shadowsocks gateway?

I have a Ubuntu server in a private network which named S1. In my private network I have another device which is named d1 and it can't use shadowsocks5 but can access network via Wireless. On S1 I ...
0
votes
0answers
22 views

IP Routing - Multiple Interfaces

I am using Elastix 2.5 (CentOS 5.11) with 4 NIC's (1 for WAN and 3 For SIP Trunk using IP Authentication) eth0 - WAN IPADDR=75.XX.XX.162 NETMASK=255.255.255.240 GATEWAY=75.XX.XX.161 eth1 - SIP ...
0
votes
1answer
24 views

ssh: connect to host host port 22: Connection timed out | No firewall

I have a Debian server and I'm trying to access it by ssh from another server and I'm getting timeout error. I have no iptables rules on any of them, and actually I can ssh to target host from any ...
1
vote
1answer
16 views

Is it possible to bind to a port that has a entry for DNAT in iptables?

I have added a DNAT entry (in the host) for a port (say 30001) in PREROUTING using iptables $ sudo iptables -t nat -A PREROUTING -p tcp --dport 30001 -j DNAT --to-destination <my guest vm ip>:...
1
vote
1answer
26 views

How to troubleshoot issue with port supposedly open?

I had succsessfully opened a port on my debian machine using iptables: I started a webserver that I have written in go and that listens to connection on port 12345. It worked fine until this morning. ...
0
votes
1answer
30 views

Changing `iptables` rules by `MAC` address

I'm using a gateway connected to VPN to do forwarding with the port of an industrial LAN element. I use iptables forwarding to access port 80/443 of my gateway in the browser to show me the contents ...
0
votes
0answers
17 views

Solve an IP conflict problem with iptables

I have two interfaces on my Linux box. The eth0 that is connected to my router and the wlan0 that is connected to a device (hotspot) that has the same IP address with my router. I route/forward ...
0
votes
1answer
18 views

reroute everything but one port to oher server with iptables

I have moved to a new webserver and now I redirect all traffic to the new server with echo "1" > /proc/sys/net/ipv4/ip_forward #clear old rules: iptables -F iptables -t nat -F #masquerade and ...
0
votes
0answers
11 views

iptables -m limit not limiting as expected

I am trying to set up speed limits on a server's multiple ports. It's a proxy server for myself, for work, and friends. Port range: 15600-18600 OUTPUT limit: up to 10Mbps per PORT I didn't try tc ...
0
votes
0answers
14 views

Multi-WAN Routing on Ubuntu DHCP Server

I am not an expert on Linux, however I am trying to achieve something for our small office configuration. I have an Linux machine with Ubuntu 16.04 server installed. The machine has two NIC's on it. ...
0
votes
1answer
26 views

IPTables - Allow only traffic from specific ranges

I am trying to block all traffic to a webserver except from some defined subnets. I've checked numerous posts and believed I had iptables set correctly but for some reason the site is still accessible ...
1
vote
1answer
35 views

iptables: MultiWAN and portforwarding & port redirection

I'm running Gentoo Linux, so using plain iptbales to manage my firewall and networking. I usually use wan0 for all my traffic, but since I have already a web-server behind that i would like wan1 (bind ...
0
votes
0answers
6 views

Unable to forward ports from the dnsmasq server

I am using a dnsmasq server in connecting to internet for a set of clients . When I am trying to forward the ports from my dnsmasq server to the clients, so that I can access my clients from outside ...
0
votes
0answers
12 views

Connect to VPN server via VPN client which is a NAT instance

Main question is how to connect to a vpn server via a vpn client which is a NAT instance, let me describe about it. Scenes 1: I have a group of service instance(ubuntu 18.04) named A One instances ...
0
votes
0answers
30 views

Freshly-installed iptables on Arch not starting

I've set up an Arch Linux install some weeks ago and have just now realized I never did anything with a firewall. Looking at https://wiki.archlinux.org/index.php/Iptables, iptables is installed by ...
0
votes
1answer
20 views

How do I route traffic back over a VPN to other servers

I am currently setting up an environment in 2 sites. all servers are linux/ubuntu. First site is my office and second site is AWS. I have 2 servers in AWS within a VPC with site to site VPN Web01 - ...
0
votes
2answers
44 views

Why there are a lot of packets not related to my IP been captured with tcpdump ? (Centos 7)

Tcpdump running by : /usr/sbin/tcpdump -U -n -i eth0 icmp or tcp dst port 22 or tcp dst port When I review the captured data , it shows : 132.132.211.221.40372 > 89.31.125.17.ssh: Flags [S], ...
0
votes
1answer
51 views

How do I update linux host iptables rules to redirect traffic within a docker container?

I would like to remap outbound traffic from within a docker container to a different port. Eg: I would like to curl 1.2.3.4:8080 from within the container and have the request actually be made to curl ...
0
votes
0answers
31 views

Change destination IP of the packet to localhost and redirect it to another port

Following is the requirement First, change locally generated requests/packets destination IP to localhost. For an example 172.17.0.1:7199 -> 127.0.0.1:7199  Then redirect this request/packet to ...
0
votes
0answers
10 views

Ubuntu ufw Lightsail not opening port 80

I have port 80 open from AWS lightsail console, and ufw status shows that port 80 should be open. And yet, I cannot curl into port 80 nor can I telnet or ping or launch a server. I've checked ...
0
votes
2answers
59 views

Iptables outbound block denies inbound

I'm trying to block only outbound connections to specific IP addresses, however I want to allow inbound connections from the same IP addresses. From what I understand about blocking outbound ...
0
votes
0answers
20 views

Linux iptables allow forwarding from a specific IP

I'am not new in iptables and Linux but I prefer your support before take a decision. I have a quite hard scenario in which the Linux "router" got many interfaces, routes, a VPN. GOAL: Allow a single ...
0
votes
0answers
20 views

How to drop specified ip ack packet by using iptables

My scenario is that through iptables TEE I mirror packet to two proxies. However I don't want the second proxy reply ack, so I want to drop the ack packet from second proxy which ip is 192.168.123.201....
0
votes
0answers
34 views

SoftEther VPN Client IP Routing on Linux

I'm having some problems to establish routing tables on my linux client machine using a Site-to-Site(LAN-to-LAN) VPN (softether). It works great for Windows clients , but for linux I don't know how to ...
0
votes
0answers
21 views

Using UCI to edit firewalls VPN rules in openwrt

Hi as a workaround I need to push UCI commands instead of IP tables, they don't work properly in the firmware of teltonika's RUT9xx series. I never really worked with them and my not working command ...
0
votes
1answer
35 views

iptables Couldn't load target `SSH'

I'm having a little problem with iptables. I am trying to make this command work but it gives me an error. I need some help, thanks. $ sudo iptables -A INPUT -p tcp --dport 22000 -m state --state NEW ...
0
votes
0answers
19 views

What package is suggested to persist linux iptables during restarts?

Since I neet to use some nat feature, provided by linux iptables I can set those "rules" manually and they work. However after a reboot those "rules" are gone. Having iptables-save I can "dump ...
0
votes
0answers
15 views

Fail2ban multiple actions

I am trying to create a jail for fail2ban, where upon a regex match I want to block the source IP from reaching either port 80 or 443 on my server. I've tried variations of this: action = iptables[...
0
votes
0answers
22 views

Ubuntu (18.04.4 LTS) - iptables keeps reloading

I'm not sure when this started, I've noticed it just today. Here is the problem: I have an ubuntu server with CSF installed, today I got an notice that my server was unreachable. I thought CSF blocked ...
0
votes
0answers
20 views

Failed because the control process exited with error code dhcpd

I get a error when I run the command: /etc/init.d/isc-dhcp-server start Help please, thank you ! I get this error :
0
votes
2answers
51 views

Ubuntu Server - “Virtual” Network Interface with Internet Access

I have an Ubuntu 18.04 server with one public network interface (eth0). I'm trying to create additional "virtual" network interfaces that will also be able to access the internet with NAT rules set up....
0
votes
2answers
19 views

iptables rule to block local net port

I'm on local 192.168.1.0/24 network with an openwrt router at 192.168.1.1 and I want to block any tcp connection to an IoT device that has an open port, let's say 192.168.1.12:5001. I don't have ...
0
votes
0answers
77 views

Iptables not recognizing I'm logged in as root

I'm running Ubuntu 18.04.3 LTS as a Virtual Machine. When I run root@:/# sudo iptables -L I get the following output: iptables v1.6.1: can't initialize iptables table 'filter': Permission denied (you ...
0
votes
0answers
12 views

How to treat packets emited locally equally to those received via network (iptables)?

If a network packet is emitted by a local IP (an IP set to a network interface in the system), it is treated differently to those packets that arrive via the non-locally (i.e. via the network)? An ...
0
votes
2answers
57 views

redirect external request to localhost with iptables

I have a service running on "localhost" address on a certain X port. Unfortunately, I can't change the address to "0.0.0.0" to expose that service. Can I use iptables to internally redirect request ...
0
votes
0answers
18 views

Use Netfilter to programatically set packet destination and route them

I'm new to iptables and its modules and I would like help in rapping my head around it. The Problem Managing large scale NAT routing. I need to handle more then 100,000 static IPs (and growing) and ...
0
votes
1answer
20 views

IPtables UDP port forward not working

I have a device sending UDP syslog messages to my server on port 514. I have confirmed this traffic is reaching my server by checking with ifconfig as well as running my collector software under root ...
2
votes
1answer
43 views

How to isolate two subnets from each other but allow Internet access for each

I have a server running as a gateway with three interfaces on their own networks: enp1s0 - DHCP to Internet enp2s0 - 172.16.0.1/12 to work LAN enp3s0 - 10.0.0.1/8 for guest wireless I want both ...
0
votes
0answers
18 views

How would I reroute *all* traffic through my SOCKS5 proxy?

I have a SOCKS5 proxy provided by my VPN, Mullvad. IP 10.8.0.1 and port 1080. I see this question has been posted a few times on this forum, but a lot of the questions I find are either unanswered or ...
0
votes
0answers
10 views

Nat a multicast address between two NICS of a linux box both on different subnets

I am using Linux centOS as a router to NAT traffic between two subnets. I can route/nat unicast packets with no problem using iptables. For simplicity sake lets say I have computer A (192.168.0.1) ...
0
votes
0answers
18 views

How to limit packet amounts per second per ip using iptables?

How to limit received packet amounts per second per ip using iptables? Is it also possible to reduce this rule to single port? I am having bigger minecraft (game) server and some hacked clients are ...
0
votes
1answer
32 views

tcpd, inetd/rinetd and iptables

What is the correlation between these programs? tcpd and inted/rinetd are very old but despite this they are still present in many distributions ... why? And there is also a correlation between hosts....
0
votes
1answer
39 views

Redirect all network traffic except ssh

I have a Linux box (let's call it Network Probe) that i would like to use for network monitoring. I need to redirect ALL the traffic for ALL the protocols coming to ETH0 to another machine (Network ...
1
vote
1answer
101 views

Is there a point to configure SNAT source address in NAT gateway?

Let's say, that one has following network topology: NAT gateway linux-router has a following SNAT rule in place: Chain POSTROUTING (policy ACCEPT) target prot opt source ...
0
votes
1answer
39 views

Networking - VLAN & Router Linux

I have a setup with 1 Debian router + 1 Debian DHCP Server. I need to create multiple VLAN on my DHCP server. From my DHCP server I have internet access. I managed to create and set up my VLANs and ...

1
2 3 4 5
42