Iptables is a module that provides the Linux operating system functions of firewall, NAT and logging of data traveling over a computer network.

learn more… | top users | synonyms

1
vote
0answers
52 views

iptables SNAT target and TCP ACK packets

I need to establish a TCP connection where the client is spoofing its IP for all outgoing traffic. My first attempt was to add a rule to the POSTROUTING chain like so: iptables -t nat -A POSTROUTING ...
0
votes
0answers
371 views

IPTables NAT and virtual interfaces

I have 2 VM's running CentOS 7 with the following ifconfig configurations: VM1: ifconfig eth0: public ip eth0:0: LAN IP 172.22.xx.x1 VM2: ifconfig eth0: no public ip eth0:0: LAN IP 172.22.xx.x2 ...
0
votes
0answers
158 views

Opening the Postgresql port

I'm trying to connect to a Postgresql server from a remote computer using: psql -U dbuser -h [host address] But I get the following error: psql: could not connect to server: No route to host Is ...
0
votes
1answer
157 views

IpTables -j REJECT to instantly block the loading on user browser

I have been searching for a solution to notify the browser on user that the request is Rejected so stop loading it. Because I have blocked facebook and every page that have a facebook plugin is ...
0
votes
0answers
19 views

Hostapd does not process HTTPS trafic from ppp0

I setup router server with hostapd 2.3 which works perfectly with eth0 -> wlan0 configuration. But if I'm switching config to ppp0 -> wlan0, then clients connected to wlan0 can access only to HTTP ...
1
vote
0answers
152 views

Can't ping server itself after connected to PPTP VPN

I've set up a PPTP server on a CentOS 6.5 machine to use VPN from public networks and other miscellaneous scripts. Everything seem to be working OK except I can't ping the VPN server by its public IP ...
0
votes
0answers
96 views

Policy based routing with uid (ArchLinux)

Desktop (ArchLinux) with 1 physical NIC wlp0s29u1u5 connecting to the Internet. There is then a Openvpn client run on it as tun0. How can I make it that user (uid 1000) traffic only uses tun0? I've ...
0
votes
0answers
297 views

Cannot open pritunl port to outside

I'm trying to install pritunl on my Ubuntu 14.04 VPS, I managed to open port 9700, so I can connect to the web interface, my VPN should be running on port 16118, but for some reason I am unable to ...
0
votes
1answer
434 views

Mark packets with iptables by destination mac address

I need to mark packets which goes to a specified mac address. I need this to use in shaper with tc. --mac-destination doesn't exist in iptables. Also I tried to use ebtables: ebtables -t nat -A ...
1
vote
1answer
447 views

Check for packets MARKed by iptables

I am marking TCP and UDP packets in order to send them to two different interfaces (say wlan0 and eth0), I did this by following this answer. Assuming this configuration: eth0 address: 192.168.0.84 ...
5
votes
2answers
5k views

what does “-m tcp” mean in this iptables rule?

Firewall configuration written by system-config-firewall -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
2
votes
1answer
148 views

Routing traffic around VPN

I recently setup a OpenVPN client on my HTPC, however once I connected to the VPN server I was no longer able to remotely SSH or connect to the other servers I had running on the HTPC. I followed ...
0
votes
0answers
27 views

iptables linux - open all ports/everything for few servers and close everything from other servers

I want to open all ports (everything) for few servers and close all traffic incoming from any other server. iptables -A INPUT -s <ip of server1>/24 -p all -j ACCEPT iptables -A INPUT -s <ip ...
0
votes
0answers
50 views

Iptables in DD-WRT

I have a WRT54GL router with DD-WRT connected to (in the same VLAN): IP radio with very low bandwith (192.168.1.107) Arduino with Ethernet Shield sending UDP messages (192.168.1.110) Another router ...
1
vote
0answers
74 views

OpenVPN and port translation

So, here's the deal. I have an openvpn instance on a port 443. I need it to also be on port 993, the same instance, the same virtual network. Openvpn can not really do that, but Linux comes with ...
1
vote
1answer
432 views

OpenVPN without NAT

I'm trying to figure out how to route OpenVPN clients without using NAT/PAT. What I want to do is to route the IP address that they are assigned when clients authenticate to the OpenVPN server to the ...
0
votes
0answers
79 views

Using pptpd with iptables and interface ppp0

I already asked this stackoverflow, but I was told to ask it here :) I'd like make a few ports only accessible via VPN (PPTP). I'm running Debian 8 on the server and pptpd v1.4.0 from apt-get and ...
0
votes
0answers
221 views

Route all traffic of several VMs through a specific VM

I want to setup 3 VMs such that VM1 and VM3 can only talk to each other through VM2. So basically, all the traffic from VM1 and VM3 needs to be routed through VM2. VM2 then forwards the traffic or ...
0
votes
0answers
99 views
0
votes
1answer
145 views

What are the security risks of connecting to a VPN?

Does connecting to a shared-IP VPN expose local ports to other users of the same VPN server? Does a VPN tunnel neutralize the protection offered by a NAT router? Are local ports reachable from a ...
0
votes
0answers
164 views

Error when configuring iptables while setting up OpenVPN on Raspberry Pi

I'm in the process of setting up OpenVPN on my Raspberry Pi. Not sure if this is the right forum to post this but when I was trying to configure iptables i get this error message. Any thoughts? ...
-1
votes
2answers
58 views

how to verify firewall rule for a particular service?

How could i check which firewall rules are used by a particular service and whether port is blocked to restrict access by external users? i.e netstat -tulnp | grep 123 udp 0 0 ...
0
votes
0answers
37 views

transfer ARP on linux iptables with diffrent subnet

Firewall(linux) - with 2 interfaces: internal, external ; also used as GW Internal: 192.168.254.1/16 External: 10.0.254.1/16 external_client(linux) IP: 10.0.1.1/16 internal_client(linux) IP: ...
1
vote
0answers
28 views

How is Windows ICS service different from Linux-based NAT & routing when I want to hide my LAN structure from ISP?

Background I've been using a WIFI-router as my home gateway perfectly until my ISP appears to restrain the number of connected devices. And currently there is not any realistic upgrade plan from the ...
0
votes
1answer
43 views

Giving a local machine an external static IP ( can be just forwarded ports)

I've planned to make one of my home machines to be a mail server I can receive mail from other people on. I have a domain name for it, and I know I need a machine with a static external IP so I have a ...
0
votes
1answer
116 views

can't telnet on port 5433 on localhost after iptables stop

I'm trying to do a telnet localhost 5433 on my RHEL box but I get a connection refused error. I did a service iptables stop but am still getting the same error. Where else do I need to look to allow ...
2
votes
1answer
77 views

tcpdump capturing packets only when interface is specified

I have tried 3 different ways of capturing a stream of packets coming into my server. Two of them work and the third does not. I am trying to determine why it is missed by the third approach: ...
2
votes
1answer
536 views

How do I block with specific string with IPTABLES?

Want to block this URL STRING with IPTABLES. Need to know specific command. "GET /affiliate/5/campaigns?api_key=duO5gVw3s0&affiliate_id=67647&format=json HTTP/1.0" 404 785 "-" "Dalvik/1.6.0 ...
1
vote
1answer
257 views

how to capture “DROP”ped packets on OUTPUT of iptables?

having a fairly complex OUTPUT processing on iptables, how does one go about capturing / displaying (at least similarly to how tcpdump captures them) the packets that were to leave through an ...
1
vote
1answer
71 views

iptables is treating traffic from different hosts differently in spite of rules

Something spooky is happening here and I don't know how to fix it. Summary: traffic that appears identical to tcpdump is being treated by iptables differently. Details below. Test setup: device ...
2
votes
2answers
278 views

Drop IP fragments of a certain protocol

When conntrack is active, the iptables stack never sees a fragmented IP packet, only the reassembled one (source), so the -f test never matches. If I want to block any fragment I could set ...
0
votes
1answer
29 views

I need to block the POP3 DELE Message by IPtables - Linux

I installed the iRedMail (Postfix, Dovecot, ....) and create Mailboxes for Users. But I hanged in the Deletion Request. I want to prevent vUsers (that have MAilboxes) from deleting the eMails ...
0
votes
0answers
41 views

iptables config to restrict dhcp trafic

eth0 is connected to internet, and eth1 is connected to clients, giving dhcp addresses. However, I've got some clients getting IP addresses via eth0. Is there a way to put a line on iptables dropping ...
0
votes
2answers
269 views

Opening port in iptables doesn't work

I add the following line before COMMIT in /etc/sysconfig/iptables: -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT Then I use service iptables restart to restart iptables, but the ...
1
vote
0answers
372 views

Is it possible to setup a NAT loopback on a router with a dynamic IP using iptables?

I've set-up a Raspberry Pi home server attached to my router. I have a dynamic IP. I can access the server within my network using the internal IP (192.168.0.8). I can also access the server outside ...
0
votes
1answer
753 views

DDWRT - OpenVPN connects, but can't communicate

This seems to be a popular topic, but I can't find any solution to the same problem I am having. Here's the setup: I have a DD-WRT router (build 14896) on a linksys WRT54GL. I have one file server ...
1
vote
1answer
68 views

allow specific port past VPN while denying all other internet access

I have a local machine that connects to a VPN for internet access, and is configured so that it can't access the internet at all besides through the VPN, although the local network can be accessed ...
1
vote
1answer
395 views

Can't ping Subnet A from Subnet B with router between them

I experimented with subnetting in my home network and Raspberry Pi. The ISP Cable Modem has 4 eth-interfaces and 1 wlan interface which all seem to be switched together. The routers IP is 192.168.0.1 ...
0
votes
0answers
103 views

Securing bridged lxc container with iptables

For some reasons I need lxc containers which have the same IPs like the host itself and other computers in the internal network. Now, I setup so far the containers with a bridge which routes to veth ...
1
vote
0answers
135 views

Can I track the CPU load that IPTABLES firewall is causing?

Since IPTABLES is a software based firewall, I am wondering if it is possible to log the exact load it is causing, cpu cycles, etc. On a small system I am sure it is trivial. But how about with ...
0
votes
1answer
113 views

Can't Access Port number 80 and 443 after adding Iptables rules

In my CentOS 6 i added a IPtables rules like DROP all the policy like iptables -P INPUT DROP Then I allow Port NO 22,80,443 with this command, iptables -A INPUT -i eth0 -p tcp --dport 80 -j ...
1
vote
0answers
38 views

Iptabes and PSAD [closed]

I have a couple questions regarding my iptables configuration. First off I am still relatively new to iptables configurations, I am going over guides and books but progression is slow. When I ...
1
vote
0answers
129 views

Too many connections from other IP addresses and my own IP address

I get thousands of connections from same IPs. It takes down my web server (Apache). How could I restrict 1 ip to open only 10 connections max using ip table rules? My 2nd issue is there are so many ...
1
vote
2answers
217 views

Linux - redirect SSH on a port to another machine on local network

I have a KVM guest machine on a virtual network. It has an IP address like 192.168.122.65. The host machine is connected to the public internet. If I open a terminal on the host machine, I can SSH ...
0
votes
0answers
11 views

Can't access my FTP Server due to change in value of IP_MODULES in iptables_config file

I could once access my FTP server usinf FIleZilla (FTP CLient) but couldn't upload files into it successfully. After trying the chmod 0777 and chown options and still couldn't upload files. I searched ...
2
votes
1answer
55 views

Netfilter/tc rule to separate SSH and SFTP traffic?

When I connect to my server (RasPI 2 with Raspbian) remotely, I want my interactive SSH sessions to always have priority over any running SFTP sessions. Also, SFTP sessions should have less priority ...
0
votes
0answers
76 views

Linux: Don't allow any non-vpn traffic

I tried the search, as I'm sure this has been asked before, but I couldn't quite find a working answer. I wish to drop any connection that is not routed via VPN (with the sole exception of the ...
2
votes
1answer
540 views

Routing subnet to specific routing table with fwmark, direct to ISP and VPN

Introduction I'm trying to set up a VPN on my router so that I have two routing tables. I want it so that all the filtering is done with iptables, and iproute just acts on the specific fwmarks, ie ...
-1
votes
1answer
136 views

Stopping multiple IPs from getting logged on iptables log

I want to log all dropped packets with my iptables (by default all except ssh), but I want to exclude the local network IPs as well as 0.0.0.0, 255.255.255.255 and 192.168.0.255 from appearing in the ...
1
vote
2answers
78 views

iptables on CentOS 6.6

I'm trying to open a port on CentOS, but it doesn't seem to work: port 16 seems to be closed and 4075 seems to be open, even though according to iptables it should be visa versa. Chain INPUT (policy ...