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
1answer
66 views

iptables password protection followup

This is a follow up on my other post about this iptables: plaintext password protection I could not get help in the old topic...I just really need some help... Here is the command I tried, something ...
1
vote
1answer
87 views

Use IPTables to force TCP packets over router

To test a TCP-stack program, I need to get the TCP packets via the router. When I try to connect to my server program via the router, the OS does not hit the router as the destination IP is the same ...
0
votes
3answers
225 views

How to configure iptables correctly

I'm a newbie to linux.I just implemented the following commands in iptables which I found on a site for security (i don't understand much about how each rule works). The commands are as follows: ...
0
votes
1answer
71 views

Per application rules in iptable

Is there possibility to add rule via iptable for specific process name? Good explanation of why I need it is here: "Under Windows, this helps making the PC more secure. There are many ...
1
vote
2answers
91 views

Connecting to an SSH server behind a NAT

I am having trouble connecting to an SSH server behind a NAT on an ubuntu workstation. I've installed openssh package(both the client and the server) and forwarded port 22 through the NAT and tried to ...
1
vote
2answers
250 views

Is selective VPN routing worth it?

I want to setup routing tables on my RT-N66U router to selectively route traffic through a VPN. For instance, only Pandora requests would go via the VPN. I've found a way to do this with iptables: ...
0
votes
0answers
28 views

how to keep counters on iptables rule replace ?

When replacing a rule (by it's number), the counters also get reset. I can think of a scripting solution, though on very high traffic, this loses packets. Is there a way to keep the counters up? For ...
0
votes
1answer
92 views

Routing traffic over Vpn without NAT?

I want to tunnel traffic through my vpn but I just realized that my kernel does not have nat enabled ;( iptables -t nat -A POSTROUTING -s 10.20.0.0/24 -o eth0 -j MASQUERADE iptables v1.4.14: can't ...
0
votes
1answer
147 views

How do I block every connection except vpn and ssh without endangering the state of my vps?

I have some vps space but I get alot of scans based on what I see in iftop. I tried some iptables stuff but it gets tiring and useless to put all the ips that I see in the logs. I am wondering about ...
1
vote
0answers
85 views

“iptables -P OUTPUT DROP” blocks DDWRT's web interface

When I do iptables -P OUTPUT DROP it blocks DDWRT's web interface. That is I am not able to access http://192.168.1.1 via Firefox. I put this rules before changing the chain policy to drop: ...
0
votes
0answers
76 views

unable to configure nat on centos 6.4

i have configured nat on my centos 6.4 on vmware workstation with the following cofiguration i have two ethernet adapters eth0 and eth1 eth0 has public ip automatically taken by dhcp eth1 has private ...
1
vote
0answers
148 views

using iptables to filter vboxnet (virtualbox host only network)

Im trying to use iptables to filter the traffic coming from a guest OS running on virtualbox. The guest is configured to use a host only adapter for the network, and my Ubuntu host is configured to ...
0
votes
0answers
80 views

Why does iptables restart cause connectivity timeout for about a minute?

I have a centos 6.5 64bit router with 3 nics. The box is configured to route 2 networks. netA - eth1 [ about 10 clients ] netB - eth2 [ about 100 clients ] provider - eth0 [ fiber to isp ] I have a ...
0
votes
1answer
128 views

UFW default rules… where are they?

In the tutorial on UFW here https://help.ubuntu.com/community/UFW it says that UFW uses the default rules if enabled and not configured. I checked the folder: /etc/ufw/ and the files I found ...
0
votes
1answer
180 views

IPTables and Port redirection Apache2

I'm using Apache to redirect a subdomain to a port (mod_proxy, mod_proxy_http, mod_proxy_ajp) and IP Tables to restrict direct port access except to me and the local server. My IP Tables looks like ...
0
votes
0answers
29 views

Redirect clients to portal web page

May I know the iptables command in Ubuntu 12.04 LTS (act as gateway) to re-direct clients to the portal web page. Currently I'm using this command but seems it doesn't work. sudo iptables -t nat -A ...
0
votes
0answers
87 views

client still cannot get internet access from gateway pc

I have already set up a laptop as a gateway in ubuntu 12.04. with 2 interface cards. internet >> eth0 >> gateway pc >> eth1 >> Access Point for eth0 IP dhcp for eth1 Static Ip 192.168.5.1 Access ...
0
votes
0answers
30 views

Need help changing where iptables logs to

I'm writing a program that needs to read in and look at the iptables log file. I know how to write rules for iptables and to make it log, but by default it logs to kernel.log. Is there a way to make ...
0
votes
0answers
18 views

Masquerade in both directions [duplicate]

I have a two networks that I need to link in two directions. network A 10.11.0.0/24 - and its gateway 10.11.0.1 network B 10.0.0.0/24 network B has a server (10.0.0.38) that is connected to the ...
0
votes
1answer
56 views

Bidirectional two networks link

I have a two networks that I need to link in two directions. network A 10.11.0.0/24 - and its gateway 10.11.0.1 network B 10.0.0.0/24 network B has a VPN server (10.0.0.38) that is doing a ...
0
votes
1answer
27 views

Setting up Debian local server on specific port

I'm trying to set up a local web server using the port 8000 to be accessed from an internal LAN network in order to test a web application. The problem is I'm not sure how to do it. I created two ...
0
votes
3answers
156 views

Temporary iptables changes

I have a remote system that I SSH. Since I am planning to make this system more publicly accessible, I want to improve my iptables rules over the current policy of accepting anything. I have added a ...
1
vote
1answer
111 views

iptables detects clients behind NAT?

I'm setting up a server that I want to protect from DoS attacks, by setting a limit using iptables: iptables -A INPUT -p tcp --dport 80 -m limit --limit 25/minute --limit-burst 100 -j ACCEPT (default ...
0
votes
1answer
8 views

Is there a way to see when iptables was last changed?

Is there a way to see when iptables was last changed? I'm running CentOS5. I found this morning that the configuration is different from what I set 6 months ago.
1
vote
2answers
504 views

Route traffic through VPN to some IPs occasionally

I would like to route traffic to some specific addresses through VPN. Easy enough, one can simply add a route: ip route add <destination ip> dev tun0 scope link Here comes the catch: I do not ...
1
vote
1answer
136 views

How to block incoming traffic on a virtual interface?

How do I block all incoming traffic on eth0:0 but keep eth0 open? What I've tried is this: iptables -P INPUT DROP iptables -A INPUT -i lo -j ACCEPT iptables -A INPUT -i eth0 -j ACCEPT But this ...
0
votes
0answers
82 views

Ping through GRE tunnel discarded between 2 interfaces of a router - Ping does not reach subnet

I have an interesting issue that I hope someone can help with. I am trying to create a GRE tunnel between 2 routers (running Linux Ubuntu 12.04) and pass traffic between 2 subnets trough this tunnel. ...
0
votes
2answers
124 views

is there an iptables rule to allow only email on port 25?

Is there a way to block port 25 for everything but mail communication? Had no luck finding an answer to this yet. Maybe it's possible to block every application but those related to above usage? I am ...
2
votes
1answer
109 views

How does uTorrent can automatically forward port through Linux Net Filter based firewall?

I have dilemma: How it is possible that uTorrent shows on my internal machine with internal IP, that my connection is OK (green check in the bottom right of its window), while I never forwarded any ...
0
votes
1answer
75 views

how to restore iptables after iptables -F?

I used iptables -F on my machine, and what can I do to recover the iptables into the default without rebooting my machine? I restarted the iptables service and it failed, and I can't find iptables ...
1
vote
1answer
80 views

excluding port from VPN client

I use hidemyass which is a vpn service. I use it for privacy reasons. The main purpose of the VPN is for my web browsing. How can I exclude certain ports from using the VPN connection? For example: ...
1
vote
2answers
188 views

Why nic with incorrect subnet mask can still ping the gate way?

At first, my network config was like this: $ ip a 2: em1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 3c:97:0e:bd:b1:68 brd ff:ff:ff:ff:ff:ff ...
-1
votes
1answer
224 views

Iptables: allow wget

for some reason the following rules block wget. iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp ...
1
vote
1answer
137 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
3answers
124 views

Show a default page after connecting to WIFI LAN

I have the following setup at home: |--------------------| INTERNET ---- | GATEWAY COMPUTER | ----- WIRELESS ROUTER )))))) CLIENT 10.10.0.2 ...
0
votes
2answers
105 views

How to set iptables?

I want to allow traffic only for httpd(nginx), port 2710 and ssh. I've tried the following, but it didn't work and apparently all httpd, traffic was blocked and I couldn't access ssh as well. There ...
0
votes
1answer
340 views

Redirect/Block outgoing HTTP traffic for a specific URL on Mac

I want to know if it's possible to redirect or block HTTP traffic with a string like this command on linux : iptables -A OUTPUT -p tcp -m string --string "STRING" -j REJECT
0
votes
1answer
136 views

On Linux, can I forward wlan0 to eth0, and wlan1 to eth1?

I have the following simple situation: two internet connections via two distinct ethernet NICs, eth0 and eth1, and two APs (I use hostapd, of course) on two distinct wireless cards, wlan0 and wlan1. ...
1
vote
1answer
251 views

iptables NAT doesn't preserve remote IP

I have the iptables rules below forwarding incoming ssh traffic on port 2222 to a virtual machine running in a vmware "vmnet" network on the same host. 192.168.1.1 192.168.1.40 +---------+ ...
1
vote
1answer
638 views

Sharing OpenVPN to specified IP-range on the local LAN

Is it possible and how to share OpenVPN (currently Anonine) -connection to specified IP-addresses on the local LAN? Local LAN consist windows- and linux machines and Android devices. Current setup, ...
0
votes
1answer
76 views

Same IP on two NICs?

This is similar to this question. However I'm looking for an answer from a perspective of worst case scenario, and risks involved. I'm not interested in LACP or cnahhel bonding. I have a computer ...
0
votes
1answer
288 views

DD-WRT port forwarding doesn't work for internal subnet

I've a router with dd-wrt firmware. I've setup 2nd IP address via Iptables commands and have portforwarded one port. It works fine. However it doesn't work internally. Trying to go internally for ...
0
votes
1answer
107 views

iptables routing traffic from1 pc to another and then out to specific internet IP

I have a server (10.10.10.2) that can't access the internet and has an APP on it that needs to access a service on public IP w.x.y.z. Another server (10.10.10.3) that does have internet access can ...
0
votes
0answers
192 views

Dropping Packets with Openvswitch Openflowcontrol

I am trying to setup some Flows with ovs-ofctl to block all unwanted incoming packets for a VM. The commands I use are: ovs-ofctl add-flow xenbr0 "priority=65000, table=0, tcp, dl_src=*, nw_src=*, ...
0
votes
0answers
87 views

how to proxy to a VPN connected server with local services running?

I'm having trouble accessing services that are running on my Linux Box from outside the local network. The setup is not as simple as most tutorials describe so I'm a bit stuck. My Linux Box (running ...
0
votes
1answer
307 views

How to set a port forward in Ubuntu's iptables?

This quote should explain me how to do this, but I don't get it... Next, I had added following rules to forward all http requests (coming to port 80) to the Squid server port 3128 : iptables ...
0
votes
0answers
110 views

How how can I set up iptables for a Squid proxy?

I rented space on a server with a static IP address, and I would like to set up a transparent proxy on this server. After configuring the Squid for testing purposes with the listener http_access ...
1
vote
2answers
2k views

iptables gives me and error “can't initialize iptables NAT”

I am trying to use iptables and it is giving me the following error root@vikkyhacks:~# iptables -t NAT -L iptables v1.4.18: can't initialize iptables table `NAT': Table does not exist (do you need to ...
1
vote
1answer
84 views

Traffic not being forwarded through NAT

I have a router which provides internet access using NAT, and a client Linux box (A) which is connected to this router on eth0. This Linux box also has a wlan interface, wlan0; what I would like is ...
0
votes
1answer
731 views

Route LAN traffic through eth0, not tun0, on my VPN access point

How can I make my Access Point send traffic to 192.168.1.0 through eth0 and all other traffic through tun0? I have set up a Raspberry Pi VPN access point. It sits on the same subnet as all my ...