iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
0answers
12 views

allow specific ip range to connect to port socat backconnect

So, we have: server 1 and server 2. On server 2 I run the command: socat file:`tty`,raw,echo=0 tcp4-listen:443 To listen for connections from server 1. The problem is, if I visit the IP of ...
0
votes
0answers
25 views

iptables not working with hotspot

I created the rule sudo iptables -t nat -A OUTPUT -d 64.182.208.181 -j DNAT --to-destination 127.0.0.1 Then, when I acess the site 64.182.208.181, instead of execute the normal page of this site, ...
0
votes
0answers
15 views

iptables on laptop

I am new to iptables and firewall setup in general and have gone through a tutorial for setup of a basic firewall. I'm mostly just learning this for fun. My current input chain looks like this: ...
1
vote
0answers
11 views

iptables routing input and forward paths

I would like to know the flow of a packet given the configuration below. Suppose that I setup an adhoc network between my android phone and a NIC on my linux box. I then setup the android phone to ...
0
votes
1answer
31 views

I am facing huge attack of layer 7 on port 3306 can anyone help me?

I am facing huge attack of layer 7 on port 3306 can anyone help me? my iptables rules are good too 184 9568 REJECT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 ...
0
votes
0answers
44 views

Using iptables to redirect all web traffic to local webserver (on both port 80 && 443)

Firstly, apologies for posting such a similar question to one that exists (Using iptables to redirect all traffic to local webserver). Secondly, I'm somewhat of a newbie to IPTABLES & DDWRT - ...
0
votes
2answers
15 views

iptables open port failed

I want to open 5627 port on 127.0.0.1 with the following command before $ netstat -tln Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address ...
0
votes
1answer
30 views

Iptables Help redirecting specific TCP/UDP Ports to VPN (tun1)

So I have a linux based router and have a vpn client set up to route traffic through the vpn and isp per iptables commands i am attempting to route specific tcp and all udp ports through the vpn only ...
3
votes
1answer
40 views

Forward ICMP Ping Packets to Interface

I've got a script that listens for ICMP ping packets (containing data payload) and while this works if you run it from command line, it doesn't work in a Docker container because ICMP ping packets are ...
3
votes
1answer
13 views

iptables LOG only once

I noticed that there are data in the iptables log that I don't need, so I was wondering if it's possible to change some configuration so that the log has less information, thus reducing the log's size....
1
vote
1answer
53 views

xargs: argument line too long

When I run below line in a shell script: /sbin/iptables-save -t filter | grep -- "-A INPUT" | grep -v "fail2ban-\|f2b-" | sed -e "s#^-A#apply_rule /sbin/iptables -D#g" | xargs -0 echo -e "`...
1
vote
0answers
8 views

How is the IMQ device positioned in the packet flow of the Linux kernel

I would like to know the exact position of the following device in the packet flow for ingress traffic shaping: IFB: Intermediate Functional Block I would like to better understand how packets are ...
2
votes
0answers
17 views

VPN with iptables and routing: access port from local network

I use a commercial VPN provider with OpenVPN as client on Ubuntu Server 14.04 LTS (but doing some testing on 16.04 LTS too). I have configured iptables and routing tables to mark packets based on user ...
1
vote
1answer
22 views

Test firewall rules without access to other machines

I'm trying to configure iptables to allow access to certain ports. So I've set up a few rules. One of the rules is to ACCEPT all traffic from localhost. iptables -A INPUT -i lo -j ACCEPT Other ...
2
votes
1answer
34 views

Limiting IP forwarding between certain interfaces/networks

I currently have ipv4.ip_forward enabled to route packets between multiple interfaces. I am now scaling up the system to 8 interfaces, but I want to limit the routing between interfaces/addresses. ...
1
vote
0answers
16 views

If it possible to permanently set a loose source routing option to all ip packages to a specific ip address?

First of all, the loose source routing is a kind of ip options which requires a selected hop to route this package. I wonder if it possible to set loose source routing option on specific ip packages(...
-1
votes
0answers
22 views

Iptables ports not open

I was set up iptables, I made some forward rules, but the ports are not open for remote acess for exemple. If I'm in the same network of firewall, the Forward rules work well. But if I try to access ...
0
votes
1answer
14 views

Editing the iptables file on Asus firmware

I have downloaded the Asus DSL-n14u firmware, extracted the .trx file and located the iptables file, as linked below: https://www.dropbox.com/s/sanz5x2bw0o5xsu/iptables?dl=0 I know the iptables ...
1
vote
1answer
36 views

Temporarily ignore/bypass proxy settings using iptables when WFH

I have an HTTP and HTTPS proxy at my work. Though when I work from home (on the laptop from work) I would like to disable the proxy settings (connect directly to the Internet). Then, when I come back ...
1
vote
1answer
48 views

How is the IFB device positioned in the packet flow of the Linux kernel

I would like to know the exact position of the following device in the packet flow for ingress traffic shaping: IFB: Intermediate Functional Block I would like to better understand how packets are ...
0
votes
0answers
14 views

Multiple Subinterfaces on a Wireless NIC (Ubuntu)

I need to create multiple subinterfaces on a wireless NIC. I have done it on a regular wired NIC before but before I test myself, I wanted to find out from the community if it is possible. The ...
1
vote
1answer
41 views

iptables configuration

I'm trying to setup iptables, the forward rules are workin fine, but the output rules are making problems. I Can't access internet from the hosts beheind the firewall neither the firewall server can ...
0
votes
1answer
34 views

Meaning IPTables command output for 3g connection

Maybe it's a stupid question but somebody can explain me the meaning of this output of iptables command in Android running 3g connection? Sorry, i forgot Chain INPUT Chain INPUT (policy ACCEPT ...
1
vote
1answer
25 views

Block countries based on IP in firewall

I would like to restrict visibility of my server from outside my country. I am connecting to my personal server always from one or two countries. Is there a way to block all the IPs coming from all ...
0
votes
0answers
17 views

Redirect locally generated traffic to a specific network and port to same network but different port?

I am trying to take all locally generated traffic destined for the network 10.100.0.0/24 on port 22408 and redirect it to 10.100.0.0/24:22409. My main issue with doing this is this traffic does not ...
3
votes
0answers
41 views

Why “echo f” in the case of clearing conntrack table doesn't work on debian?

Many people don't clear the conntrack table when they want to reload their firewall rules. When you have some ESTABLISHED connections, all the sessions won't be affected when you add a rule that ...
0
votes
1answer
38 views

how to forward ntp traffic to default gateway instead of vpn tunnel

I have a small Raspberry Pi server connected to an openvpn provider, used as a VPN gateway. Almost everything works fine with the following iptables rules: iptables -t nat -A POSTROUTING -o tun0 -j ...
1
vote
1answer
15 views

Would packets being processed by iptables chain be affected when updating iptables rules?

Suppose there are always packets being processed in iptables chains all the time. When I update iptables rules vi command line, would those packets still in process be dropped or delayed? In other ...
0
votes
0answers
19 views

error nf_conntrack table full without iptables running

Why I am getting "nf_conntrack table full" error in syslog even when I am not running iptables? I believe if iptables not running then nf_conntrack shouldn't used, even it's loaded into the kernel.
0
votes
0answers
32 views

Very slow RMI+SSL requests after added SSL certificate

I added a SSL certificate to a RMI based application, and it's working normally on test server, so after deploy it at production servers, all requests are waiting for SSL handshake, even local ...
1
vote
2answers
26 views

why do we need to specify 1 in the command iptables -I INPUT 1

While I configure the Linux firewall there is a command iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT In this command why do we need to specify 1 after INPUT
1
vote
0answers
29 views

How to proxy all traffic except local traffic and ssh to another server?

I have an application that connects a local database on the loopback address. I would like to send all the traffic of this application to another server to hide it's IP. The first solution I tried is ...
-1
votes
2answers
34 views

SSL Strip Attack: Confusion with “echo 1 > /proc/sys/net/ipv4/ip_forward”

In the SSLStrip attack, one has to enable IP forwarding using the command : echo 1 > /proc/sys/net/ipv4/ip_forward I understand this command enables the host to work as a router forwarding ...
3
votes
1answer
38 views

Using iptables to stop brute force attacks on a Apache https site

I have a TLS site Apache which uses Basic Authentication to protect resources. I'm trying to setup an iptables rule to prevent brute force attacks on port 443, so I've added the following iptables ...
0
votes
0answers
18 views

Troubleshoot routing in rewrite/virtual host

I don't want a solution as much as a way to find the problem. I am learning networking mostly because it interests me and I set up something in my uncle's restaurant. It looks like this. A soft AP ...
2
votes
0answers
56 views

privoxy or any proxy server on Linux forward requests to multiple different proxy servers

I'm a stack exchange Virgin. Is it possible to forward data to the parent proxy based on the listen-address port in was recieved For example my firefox browser is set to use proxy 90.91.92.93:8118 ...
1
vote
1answer
35 views

tcp tunnel inside local network with iptables and bridge involved

I want to configure outside and inside forwarding rules to behave the same way, and simplified problem that i have with 'inside part' is like this: if i have compA - eth0 192.168.0.1 compB - br0 ...
1
vote
0answers
63 views

How to do iptables nat loopback?

I have a linux server behind the ISP's cablemodem-router combo. With some hacking I was able to make the port forwarding work, and the DHCP exceptions in the udhcpd. But I wasn't able to do the NAT ...
3
votes
2answers
182 views

Why doesn't iptables receive the marked packet?

I was learning the ping command options. In that I found the -m option to set the mark for a packet. The below command sends the packet with marking of 10 to the 192.168.2.65. ping -m 10 192.168.2....
0
votes
0answers
26 views

iptables traffic redirecting going wrong - UDP forwarding from proxy

good evening! I have a proxy running HAProxy and iptables in my network (and that proxy is behind another firewall and NAT). So far, I've been doing only TCP redirects to servers using HAProxy, and ...
2
votes
0answers
58 views

Is an SSH connection timeout expected when iptables is set to REJECT?

We’re setting up a firewall for a machine that should allow: incoming SSH connections from particular IP addresses; ICMP, except for redirect. We’ve opted to use REJECT over DROP, at least until ...
0
votes
1answer
41 views

iptables redirect via url to localhost vhost

I'm trying to set up a test environment for a mobile app. I have a machine acting as a gateway and providing dhcp on 192.168.10.0/24, and serving pages from apache. How would I set up iptables rules ...
0
votes
2answers
100 views

iptables forward traffic to vpn tunnel if open

I've used the following guide to set up my raspberry pi as an access point: Raspberry Pi 3 as wifi access point I'm forwarding wlan0 to eth0 and NATing all my traffic. Works great! sudo iptables -t ...
2
votes
2answers
32 views

Debian 8 - IPTables reverts to state on every packet

Problem: iptables cannot be changed. On my computer, I can run iptables -F. iptables -L shows it is flushed. When any packets come into or out of the machine, all rules are back! The same behaviour ...
0
votes
0answers
42 views

ubuntu 14.04 create route to multicast stream server and have access udp://239.255.0.169:5500

My server is ubuntu 14.04 server edition and I am trying to re stream existed multicast stream by my server : Multicast stream server is using udp://239.255.0.169:5500 destination ip. On my side I ...
2
votes
1answer
94 views

What is the meaning of UNCLEAN state in iptables

What is the meaning of UNCLEAN state in iptables? Example: iptables -A INPUT -m conntrack --ctstate UNCLEAN -j DROP This actually gives me an error, but there should exist an unclean state. ...
1
vote
0answers
23 views

NFTables NAT not caolled

I have tried to switch from IPTables to NFTables. Everything worked fine, except of NATting. This configuration does nothing when I try to run it, the NAT chains are not called: table ip vms { ...
0
votes
1answer
31 views

How to do Masquerading with NFTables

How would I implement a masquerading rule like this iptables one in NFTables: iptables -t nat -A POSTROUTING -s 10.5.6.0/24 -o eth0 -j MASQUERADE I've looked for it, but couldn't find out how to ...
6
votes
0answers
97 views

Simulate ethernet cable unplugged on a remote machine while staying connected

I am working from home on remote embedded Linux machine "X" via ssh. It has one physical network card. I need to simulate Ethernet cable unplugged condition on the same remote machine "X" , while ...
3
votes
0answers
31 views

No “unreachable” response for an outgoing TCP connection when using fwmark and policy routing

I would like to route locally-generated traffic: to a TCP port "A" of host "H" via the interface "A", to a TCP port "B" of host "H" via the interface "B". Interface "B" is sometimes unavailable. ...