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

2
votes
1answer
3k views

DD-WRT firewall rule configuration

I'm using DD-WRT on my linksys router. I want to limit each user on my network to 200 connections at any given time. Does anyone know the rules I enter the firewall in DD-WRT admit panel. I tried ...
1
vote
1answer
19 views

How to print iptable firewall rules?

How does one print or dump the firewall rules being used by iptables in an effort to trouble shoot connection problems? I'm fairly certain its going to include -L or --list, but I'm not sure of other ...
1
vote
3answers
3k views

iptables syntax to forward remote desktop requests to a virtual machine on CentOS host

I can rdesktop into a VM running Windows XP hosted on my CentOS 5.4 machine from the hosting machine and work just fine using the private address (192.168.122.65), but I now need to allow remote ...
2
votes
2answers
2k views

How to use iptables to connect proxy server

In my company, all http and https must connect to a proxy server, which means we must set proxy in our web browser. Our department has an internal network (192.168.0.xxx). I use a Linux server as ...
1
vote
1answer
19 views

iptables - UDP Packets from unknown IP addresses

I'm really new to basic systems administration, and this question is a bit difficult for me to Google. I'm setting up a small raspberry pi server for my own personal use, to teach myself some basic ...
0
votes
1answer
19 views

What minimum'allows' should be used in iptables rules?

I have a Ubuntu 14.04 server which has two Ethernet ports: eth0 directly connects with a custom camera and eth1 connects via LAN cable to a wireless router. I had been developing a web application ...
-1
votes
0answers
13 views

allow vpn and internet ports block everything else [duplicate]

can someone help me write ip tables rule for allow vpn route all traffic to Vpn Internet and block everything else pings so allow vpn and Internet port 80 block everything else thanks for help
0
votes
2answers
63 views

How do I set Input interface is output interface

I have eth0 with IP X.X.X.X and eth0:0 with IP Y.Y.Y.Y. My goal is if I connect to eth0 then output ip shoud be X.X.X.X and if I connect to eth0:0 the output ip should be Y.Y.Y.Y. Example: VPN ...
1
vote
2answers
38 views

Openvpn connects and responds to ping but no internet access

I have an openvpn server running on raspian and a tunnelblick client on osx. I can connect to the VPN just fine but I have no intenet access. The server responds to ping just fine and the port is open ...
2
votes
3answers
2k views

iptables firewall only allows internet traffic if source port of 80 is allowed

I am configuring an iptables firewall, currently just to allow http and https traffic. It is working but under a particularly strange rule - I must allow incoming connections with a source port of ...
0
votes
1answer
41 views

how to save iptables rules permanently?

I want to keep some iptables rules permanence, so I just only add the rules manually: /sbin/iptables -I OUTPUT -p tcp --sport 80 -j QUEUE I am sure that the command works, because I could see it ...
0
votes
2answers
1k views

blocking port 80 via iptables

I'm having problems with iptables. I am trying to block port 80 from the outside, basically plan is we just need to Tunnel via SSH then we can get on the GUI etc. on a server I have this in my rule: ...
3
votes
2answers
3k views

What does an empty iptables mean?

I'm using CentOS and when type the command: iptables -L -v The output is as follows: Chain INPUT (policy ACCEPT 19614 packets, 2312K bytes) pkts bytes target prot opt in out ...
2
votes
1answer
435 views

How to forward ports through ssh and nat to another machine

I have a problem when using ssh port forwarding and nat simoultaneously. Situation: Machine A runs a webserver on port 8080 Machine B is a raspberry pi which works like a little router. It has two ...
0
votes
1answer
17 views

iptables INPUT command

On a ubuntu1, this is iptables command: sudo iptables -A INPUT -p icmp -j DROP so on the other computer (xp1) I can not ping the ubuntu1.So this is OK. But On ubutnu I [[ can ]] ping xp1. and I ...
0
votes
1answer
25 views

iptables duplicate traffic to another ip

This blog post has a template iptables rule to forward traffic, to and from the router to another ip address. iptables -t mangle -A POSTROUTING \ -d [IP to spy on] \ -j ROUTE –tee –gw ...
1
vote
1answer
14 views

Iptables: Filtering string encrypted by ssl

I need to filter (send to BANRULES set) incoming http/https packets with a certain string (matchword). I do it easy when ssl is not in use (port 80): iptables -A INPUT -p tcp -m tcp --dport 80 -m ...
1
vote
3answers
47 views

Configuring IPTables to exclude webhost from VPN tunnel

I have a Raspberry Pi running as a server for my webhost. Raspberry pi is connected to a VPN service 24/7. Due to this, I am unable to connect to my webhost using my public IP address issued by my ...
1
vote
3answers
6k views

How to block all ports except 80,443 with iptables? [duplicate]

Blocking all ports(in and out) is easy but it's hard with the word "except". I don't know any rules that satisfies the condition. PS: I know this question is nothing new. But in fact, I didn't find ...
1
vote
1answer
26 views

How to forward http request to a proxy server?

I have an Internet Linux server and my client computer (running windows) accesses internet via a SSH tunnel to the the server. Now for some reason this server can only accesses internet by a http ...
1
vote
2answers
7k views

Block all ports except SSH/HTTP in ipchains and iptables

How can I block all ports except ssh (port 22) httpd (port 80) using iptables and iphains?
0
votes
1answer
15 views

Clients unblocking AWS S3 Content on their firewall

I have a website that serves out user generated content from AWS S3. I have a client that wants to use our website from behind a firewall. They are asking me to provide them with a static IP Address ...
0
votes
1answer
37 views

Creating a login portal for my WiFi

Me and my room mate often have a lot of friends come over to our apartment to play games and what not. So we are talking a lot of devices connecting to my router (cell phones, tablets, laptops etc .. ...
3
votes
1answer
2k views

Allow access from outside network with dmz and iptables

I'm having a problem with my home network. So my setup is like this: In my Router (using Ubuntu desktop v11.04), I installed squid proxy as my transparent proxy. So I would like to use dyndns ...
0
votes
1answer
37 views

How can I configure one of the ubuntu desktops as “dhcp-relay-agent”?

How can I relay DHCP requests from LAN to WAN in linux so that the desktop connected to the LAN interface can have Internet access from WAN? Note: WAN has Internet access.
0
votes
0answers
11 views

DD-WRT route between vlan2:1 and vlan2

I've been trying to configure a Netgear R7000 with DD-WRT on board. My problem is the fact I have a private ip assigned to the WAN (vlan2) and a public ip assigned to vlan2:1 If I use only iptables ...
2
votes
1answer
3k views

How to use NAT iptables rules for hostapd

My PC is equipped with two net interfaces - wlan0 and eth0. I want to use WiFi port as access point on wlan0. So i use hostapd facility and it works properly in routing mode in local network. Users ...
1
vote
0answers
25 views

Nodejs remote debugging ports closed

I have a problem with nodejs remote debugging. I'm using centos on remote server and phpstorm on my PC. When I open putty I type the command: node --debug-brk=5858 main_server.js, and get the ...
0
votes
0answers
18 views

iptables settings for Tomato

I am trying to figure out the iptables settings for my router. Right now I have two networks, a home network on br0 and eth1, and a guest wifi on br1. Home IP addresses are on 192.168.1.x, and guest ...
0
votes
0answers
15 views

Access two web servers (VPS and Windows Server) through the same IP (PUBLIC AND VPN) using VPN

I have two servers: a hosted VPS with a website on port 80 and a home server running Windows 7. The home server is running WAMP on port 88, which works on my home's public and local IPs. When ...
0
votes
1answer
26 views

How can I control specific traffic like UDP traffic with iptables on ubuntu?

If for example I would like to send just the UDP traffic to an IP-address, is it possible to do this with iptables ?
2
votes
0answers
41 views

Modify incoming packets before forwarding in Linux

I’m using a Linux (Debian based) system on which IP forwarding is enabled (/proc/sys/net/ipv4/ip_forward is set to 1). I can read the incoming packets using a raw sockets program, but I want to modify ...
0
votes
0answers
28 views

How to Ban an IP address automatically in ubuntu 12.04 when it sends specific packet to server?

I run a game server and someone is attacking with fake players. I want to ban him automatically in Ubuntu V P S. Any IPtables command or program that can accomplish this task? If it's not possible ...
0
votes
1answer
47 views

linux: how to troubleshoot forwarded port?

My home internet connection has a static IP address (eg: 123.123.123.123) I have configured my router to forward port 9000 to an internal host (192.168.1.101), which is running Ubuntu 14-04. I run ...
1
vote
3answers
84 views

How to block network traffic on ubuntu gateway via arp table

I have a network with 80 PC and a ubuntu 12.04 as GW. For security reason I want to limit the Computers connected on this network using an ARP precompiled table. In other words I want a tool that ...
1
vote
1answer
30 views

Block traffic to LAN but allow traffic to Internet (iptables)

On my home network I am setting up a CentOS server that will be used by about a dozen or so for educational purposes - e.g. learn how to use the Linux shell and host websites, among other things. I ...
0
votes
1answer
24 views

About network traffic control

I have a satellite internet connection -> a pretty nice 8 processor server with 64gb of ram, running debian 7.7, two lan ports, one connected to the gateway, the other to the wifi router, wifi to all ...
1
vote
1answer
250 views

Iptables limit user access time and mac

I am trying to create an iptable chain to kick my daughter off her ipad during the night. With the mac only filter I can block access but when I add time it no longer works. Does anyone see an issue ...
0
votes
0answers
42 views

Map remote host to local ip (linux)

How can I map remote host to local ip? For example: If I map google.com to ip 192.168.1.15 so when i ping 192.168.1.15 i get forwarded response from google.com Maybe Iptables or something?
0
votes
0answers
36 views

Connections from virtual host to internet OK, but to rest of LAN, broken

In a notebook running Ubuntu 14.04 I have installed VirtualBox and created a virtual server with Windows 7. The PC is connected to a 192.168.x.y LAN. The virtual server is in a host-only network with ...
1
vote
1answer
35 views

Debian 7 - iptables 'filter' not supported?

Am attempting to forward/ masquerade connections from WLAN0 to ETH0 as follows: sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE sudo iptables -A FORWARD -i eth0 -o wlan0 -m state --state ...
0
votes
0answers
51 views

iptables snat does not change source IP

I am on ubuntu (with IP 10.0.0.1) trying to snat packets going out from port 9090. I want to change the source IP to 10.0.0.2 I have added the following rule through iptables: # iptables -t nat -A ...
0
votes
1answer
25 views

Config to make only pcap receive packet

I am trying to use pcap to modify the packet before sending it out. For example, I have a server (running Ubuntu) listening on port 8000. Before it sends out SYN-ACK for incoming SYN packet, I am ...
1
vote
1answer
3k views

iptables trouble: nat with ip alias (virtual interface) not working

I'm setting up an Ubuntu 11.10 server to act as firewall for a network running several different SSL websites. The idea is fairly common: have all public IP's for each site aliased to the public ...
0
votes
1answer
62 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
18 views

Packets are delivered to the host, which has the (dst) IP, but the application bound to the IP/port never see the packets

I have an iMac and a dd-wrt router. On the Mac side of things I have a proxy executable that I wish to use, but I've been unable to figure out how to make pf forward packets to the same host. ...
0
votes
0answers
44 views

Cannot SSH on machine behind NAT. DD-WRT router

I'm trying to remote access my home Debian from my other office. The home Debian is behind a DD-WRT router, connected from a ADSL modem (Yeh, it's dynamic IP but I have someone to tell me the WAN ...
0
votes
1answer
656 views

iptables not starting on CentOS 6

I am running CentOS release 6.5 (Final) and cannot figure out why my iptables is not starting. I may have executed some other command to permanently prevent the start up of iptables; I do not ...
0
votes
0answers
51 views

Routing specific port ranges to specific gateway on Asus AC68 router using iptables and ip route

Linux noob here. I was hoping someone could help me with configuring some routing rules on my router, an Asus AC68. The router is connected to two gateways, wan0_gateway and wan1_gateway. I have ...
0
votes
0answers
27 views

Why is the TCP open but not the UDP?

I'm setting up a game server and I have a bunch of ports forwarded already (all in use). So I'm putting one into /etc/ppp/firewall-masq, which is full of iptables rules. The game server is served by a ...