iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

1
vote
1answer
34 views

Can not connect to the host itself

Well, the problem is simple. I have the site based on apache and trying to execute cron job at this site from the same server. Let's say my site http://example.com and cronjob is /usr/bin/curl http:/...
1
vote
1answer
14 views

Iptables drop access to specific ip address except from my ip

I've got a dd-wrt router running and I want to block access to a wireless printer from all ip addresses except from the ip addresses that are allowed. let's say my printer's ip is 192.168.1.101 and my ...
0
votes
1answer
29 views

Script to ban IPs that try to enter root on server

Is there such a script that blocks IPs that try more than 3-4 times to access root? Because everytime I open the server (CentOS) i get the message that root has been brute forced (bots obviously). I ...
2
votes
2answers
26 views

How to blocks icmp echo requests from a subnet

On my linux box I've 2 NICS: br0 192.168.1.0/24 (192.168.1.1 server) eth1 192.168.2.0/24 lan1 eth2 192.168.3.0/24 lan2 [...] there's a routing from eth1 to br0 and also from eth2 to br0 I droppped ...
1
vote
1answer
19 views

iptables how to block clients each other

I've a guest network (192.168.2.0/24) connected by routing to my linux box (192.168.1.0/24). I'd like, permits clients go online (I already done this), but I need a rule to blocks clients to see each ...
3
votes
1answer
40 views

How do I restart iptables in Debian 8.5?

I am trying to block port 111, I did the following: iptables -A INPUT -p udp --dport 111 -j DROP then I did rpcinfo -p {IP of Debian 8.5 server} from a different server, but, port 111 is still open....
0
votes
1answer
50 views

Redirect all outbound UDP DNS request to a localhost DNS server

I am trying to redirect all outbound DNS request(made from local) to a tunnel running on localhost listen for UDP on 127.0.0.1:5353. iptables -t nat -A OUTPUT -p udp --dport 53 -j DNAT --to 127.0.0.1:...
1
vote
1answer
20 views

Why does my iptables configuration allow non-TOR traffic?

What on earth is going on here? I have the following rules set: Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target ...
1
vote
0answers
21 views

iptables - Map port on the host to a port in a Docker container

I am running a Docker container inside AWS Elastic Beanstalk, running Amazon's 'Amazon Linux', which I believe is a CentOS derivative. In my development environment, I'd like to enable debugging on ...
0
votes
1answer
35 views

iptables does not generates log

I have this script make_firewall.sh with rules for iptables: iptables -F iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp --dport 443 -j ACCEPT iptables -A INPUT -s 127.0.0....
1
vote
0answers
23 views

Redirecting all tcp traffic to Tor using iptables (proxy?)

I'm on the verge of smashing my T61 into pieces. I've installed tor, and put this in the torrc file, as indicated by the Tor Wiki: VirtualAddrNetworkIPv4 10.192.0.0/10 AutomapHostsOnResolve 1 ...
1
vote
2answers
18 views

Voice-over-IP with a VPN

I use an IPFire (linux) router as a VPN client. My voice-over-IP is working properly without the VPN active. However, when the VPN is up, my SIP client (Twinkle) can't register with my VoIP provider. ...
1
vote
1answer
85 views

Completely new to SSH

I'm trying to SSH from Debian (Jessie, installed as chroot environment in Chrome OS) to Arch on the same network, and I keep getting an error saying the connection was refused because of a public key ...
1
vote
1answer
25 views

linux + iptables + /etc/sysconfig/iptables

on my linux machine I see the following: iptables -L Chain INPUT (policy ACCEPT) target prot opt source destination Chain FORWARD (policy ACCEPT) target prot opt source ...
2
votes
2answers
51 views

Fedora 24: ports show as open when scanned from server, but closed when nmapped from outside

I have a Fedora 24 server, serving an Angular2 project. Angular2 automatically opens ports 3000 and 3001 once the service is started. However, although running nmap localhost shows the ports are open, ...
1
vote
1answer
104 views

How to completely block ssh and pings to server running Oracle Linux 6.7

We are facing IP abuse issues and want to completely BLOCK ssh and ability to ping our servers running Oracle Linux 6.7 and only allow vnc connections. How to achieve this using linux firewall or ...
0
votes
1answer
25 views

iptables rules to access/mount a remote NFS server

Actually when iptables rules are not cleared, trying to mount a remote NFS share failed with a timeout. After a reset of iptables rules, i'm allowed to mount properly the NFS remote server. What are ...
2
votes
1answer
22 views

libvirt guests: accept connections from outside network

From libvirt documentation: By default, guests that are connected via a virtual network with can make any outgoing network connection they like. Incoming connections are allowed from the host, ...
2
votes
0answers
11 views

Redirect traffic to specific website

I am trying to setup something like a captive Portal but get stuck. I have an embedded device which starts a Wireless Access Point. Now I like to forward all traffic to a website on the device. I do ...
1
vote
1answer
39 views

How to tell stateful vs stateless firewall with nmap ACK scan

I'm having trouble figuring this out. Supposedly, nmap can distinguish stateful firewalls from stateless firewalls by using the -sA or ACK scan, but I'm at a loss as to how one would discern that fact ...
0
votes
0answers
28 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
1answer
40 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
21 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
16 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
34 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
52 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
25 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
40 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
57 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
19 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
64 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
14 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
25 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
30 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
42 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
18 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(...
0
votes
1answer
28 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
46 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
84 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
19 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
46 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
39 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
44 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
22 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
49 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
67 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
17 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
35 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
28 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