iptables allow creation of rules to define packet filtering behavior.

learn more… | top users | synonyms

0
votes
1answer
14 views

iptables to allow only ssh and vpn from outside world

i do have my a VPS (debian 7) 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 VPS ...
0
votes
0answers
11 views

iptables-save: what are the colon-separated numbers inside brackets? [duplicate]

The command iptables-save prints the current iptables rules. However the tables have two numbers inside brackets for each chain. What are those numbers and why won't they flush away with iptables -F ...
1
vote
0answers
19 views

Linux redirect target IP to other subnet

I have two Linux machines. Both of them have two adapters one frontend -> 172.17.62.x one backend -> 192.168.141.x I want to make sure that even though two applications are resolving each ...
5
votes
2answers
276 views

port forwarding to application in network namespace with vpn

I was able to set up a network namespace, establish a tunnel with openvpn and start an application that uses this tunnel inside the namespace. So far so good, but this application can be accessed via ...
0
votes
0answers
15 views

iptables rules on startup - doesn't work [duplicate]

Using Debian Jessie stable, trying to make my own iptables rules activate during boot up, preventing any leaks. I did this: iptables-save > /etc/firewall.conf echo 'iptables-restore < /etc/...
1
vote
0answers
10 views

Shape traffic flowing through dd-wrt router

I am working on an experiment in which several devices connect to each other via a wireless network. I want to be able to shape the traffic between the devices, i.e., control the bandwidth, latency, ...
0
votes
0answers
26 views

Loading iptables rules on boot [duplicate]

I'm using Debian Jessie stable and I wanted to make it so it uses my own iptables rules immediately on boot. I've tried the following: iptables-save > /etc/firewall.conf echo 'iptables-restore &...
1
vote
2answers
2k views

iptables allow only ssh and vpn traffic

I have dedicated server with ubuntu 14.10 installed. The server should connect to an openvpn server and the traffic should only go through the vpn, except for SSH traffic. My idea is to realize it ...
1
vote
1answer
35 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
50 views

Is there a way to automatically restart docker after updating firewall rules with iptables?

A recent update of iptables and firewall rules caused errors in our app. The culprit was finally found: the docker daemon needed to be restarted because it adds its own NAT rules to the firewall. How ...
15
votes
4answers
43k views

Output traffic on different interfaces based on destination port

My question is basically the same as Only allow certain outbound traffic on certain interfaces. I have two interfaces eth1 (10.0.0.2) and wlan0 (192.168.0.2). My default route is for eth1. Let's say ...
13
votes
3answers
45k views

iptables: allow certain ips and block all other connection

How do I allow certain ips and block all other connection in iptables?
1
vote
1answer
18 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 ...
3
votes
0answers
206 views

iCloud stuff stops working while connected to OpenVPN

I have a fairly simple OpenVPN setup on an OpenVZ VPS with Ubuntu 11.10. Client is the Viscosity client on Mac OS X 10.8.2, and after some testing, we can rule out the client as being part of the ...
4
votes
2answers
2k views

Iptables GEOIP not working under Debian Squeeze

I've just installed xtables-*, compiled the geoip database, but when I try to use an iptables command it always gives back the following error: Command iptables -I INPUT -p tcp --dport 80 -m geoip --...
0
votes
1answer
33 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
27 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
52 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....
1
vote
1answer
22 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 ...
0
votes
2answers
1k views

Route wlan0 to openVPN tunnel and rest to eth0

I'm having problems to create route/iptables rules for following configuration: I have an openVPN server (tun type) running on my raspberry machine at home At work i have company pc (behind proxy) ...
0
votes
1answer
52 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
0answers
24 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 ...
2
votes
2answers
54 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, ...
0
votes
1answer
36 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
1answer
199 views

Web server won't show Drupal install page [closed]

My web server is showing an Apache 2 test page when it should be showing the Drupal install page. I've set up permissions correctly, so the last thing I've read it could be are the iptables firewall ...
5
votes
2answers
5k views

IPTABLES is slow after adding '-A INPUT -j DROP' to rule list

I am just getting started with iptables and stumbled across something I don't really understand. FYI, I followed the instructions of Ubuntu wiki's IptablesHowTo. The nat and mangle tables are empty, ...
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
0answers
28 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 ...
4
votes
3answers
6k views

Why must loopback traffic be authorized using iptables to get web access?

I thought the following was necessary was necessary for outgoing HTTP on a desktop (non-server): iptables -A INPUT -p tcp -m multiport --sports 80,443 -m conntrack --ctstate ESTABLISHED -j ACCEPT ...
1
vote
1answer
88 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 ...
2
votes
3answers
2k views

Checking the type of NAT

I have read that there are many types of NATs available like symmetric NAT, full-cone NAT, etc. If I am behind a NAT, is there any way to find out the type of NAT behind which I am currently working ...
1
vote
1answer
2k views

iptables to allow teamviewer

I'm having some trouble to allow TeamViewer in a restrictive iptables configuration. I'm running Fedora 20. After some research I found out TeamViewer uses ports 80, 443 and I have created this ...
4
votes
2answers
1k views

Port fowarding and load balancer in ubuntu server 12.04

I am looking to create a load balancing server. Essentially here is what I want to do: I have a public IP address, lets say 1.1.1.1 I have a second public IP address, lets say 2.2.2.2. I have a ...
1
vote
1answer
27 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 ...
1
vote
0answers
24 views

Reducing Apache-Spam

I got a hack-attack and all my Wordpress instances got modified. Now it seems that I have fixed everything and all my "backdoor-shells" and Wordpress-instances are back running secure (hopefully). ...
1
vote
1answer
107 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
6k views

/etc/sysconfig/iptables : how to block everything except for port 80 and 22?

My new centos 6.5 cloud server came with this /etc/sysconfig/iptables inside we have: # Generated by iptables-save v1.4.7 on Mon Jun 16 20:04:05 2014 *filter :INPUT ACCEPT [8:607] :FORWARD ACCEPT ...
11
votes
2answers
365 views

Linux iptables ssh port forwarding (martian rejection)

I have a Linux gateway performing NAT for my home network. I have another network which I'd like to transparently forward packets to, but only to/from specific IP/ports (ie. not a VPN). Here's some ...
5
votes
1answer
112 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 ...
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 ...
1
vote
2answers
2k views

iptables - Redirect web traffic to LAN Server

I have a webserver which is running on ip address 192.168.11.100 How can i use iptables to redirect all web traffic (http and https) to my webserver on LAN? After that i want to add except list mac ...
2
votes
1answer
25 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
13 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 ...
2
votes
1answer
3k views

Port Mirroring using iptables - copy all traffic among nginx on :80 and apache on :8080

I have nginx running on port 80 and apache running on port 8080 I want to transfer all the traffic to both nginx and apache asynchronously i.e the performance of one server wont be dependent on the ...
3
votes
1answer
20 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....
0
votes
1answer
234 views

How to unmask an IP with iptables?

Is there a way to unmask an IP using iptables? I know to mask all-in-one is following by: iptables -t nat -A -POSTROUTING -j MASQUERADE
1
vote
1answer
43 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 ...
2
votes
1answer
927 views

pptpd dead but subsys locked? on cent os

i install point to point tunnel (PPTP) in my VPS. (Cent OS 6 64 Bit) everything fine after reboot the PPTP not worked client side. the pptpd status shows " pptpd dead but subsys locked ". how to ...
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, ...