Iptables is used to set up, maintain, and inspect the tables of IP packet filter rules in the Linux kernel.

learn more… | top users | synonyms

0
votes
2answers
2k views

How to tunnel traffic to certain destinations over ssh?

I'd like to send traffic destined to certain ip/subnet through one ssh socks5, while routing other traffic through another socks5 tunnel. I'd tried tsocks with following configuration: path { ...
1
vote
1answer
4k views

'/etc/hosts' , http links are redirecting, but https links are not redirecting

I edited /etc/hosts file and entered below information : 127.0.0.1 test.com //working 127.0.0.1 https://test.com //not working . from the above info, http://test.com is redirecting to ...
2
votes
1answer
639 views

How do I block a protocol using iptables firewall

How to block a specific protocol using iptables firewall? For example block Yahoo messenger?
2
votes
1answer
2k views

how to enable iptables tarpit?

I'm using ubuntu server 10.04 and I have to enable tarpit module . I installed the followning packet : aptitude install xtables-addons-common xtables-addons-source module-assistant auto-install ...
0
votes
1answer
2k views

fail2ban is not sending mail when it bans an ip!

I have configured fail2ban to send me a mail when it bans an IP, but it is not working. I get a message when the jails start and stop but nothing else . I am using ssmtp to send mail via Google Mail. ...
0
votes
1answer
82 views

IPV6 modules whats really needed?

I've added blacklist ipv6 to my blacklist.conf file to keep the ipv6 module from loading, but there's a lot of other modules related to ipv6 as well that I'd like to know if I can add to the list as ...
7
votes
1answer
60k views

How to start/stop iptables?

While learning some new things about iptables I can't through this. While I am trying to start, its saying as root@badfox:~# iptables -L -n -v Chain INPUT (policy ACCEPT 0 packets, 0 bytes) pkts ...
3
votes
2answers
8k views

How to configure UFW to allow IP Forwarding?

I have UFW, OpenVPN and Virtualbox installed on my home server. I have a host-only network for my virtual machine guests (vboxnet0) set up with the IP range 10.0.1.0, and another IP range of 10.0.0.0 ...
1
vote
1answer
884 views

Minimal LAMP iptables setup

What rules are needed for an Ubuntu LAMP server only having minimum necessary ports open.
6
votes
1answer
2k views

Block Ping from a specific IP

I am on a private LAN 192.168.1.0/24. My ip is 192.168.1.3, I want to block only ping requests from 192.168.1.2. I am running ubuntu 11.10. I found two links First tells how to block an IP but not ...
2
votes
4answers
1k views

How do I prevent iptables from loading on boot?

I don't need iptables on my computer, since I'm behind a NAT Server and a router. I, therefore, flushed all the rules I had left to disactivate the firewall. I'm wonder if I could probably prevent ...
3
votes
2answers
13k views

How do I allow all possible IPs for Gmail servers through my ufw firewall?

I am currently using the following rule: ufw allow out from my_local_ip to any port 587 This is a little too lax for my liking. I would like to tighten it up and restrict it to only gmail's smtp ...
1
vote
2answers
317 views

iptables sharing internet connection with restricted access

I am trying to configure an ubuntu server to share internet access from eth0 to client systems on eth1 however I only want to allow access in/out on port 1688 and also resolve host names while ...
0
votes
2answers
1k views

iptables problem

Hi guys i have the follwoing iptables file for my ubuntu 12.04 server. ITs a bit messy because i tried different ways to fix it but the problem is it doesnt allow apt commands such as apt-get to run. ...
1
vote
1answer
1k views

How to set fail2ban with apf?

I just installed fail2ban and the apf firewall. Those 2 seems to be not working together. Fail2ban have added some ipatble rules but they are not working. When I issue "/etc/init.d/iptables status" ...
2
votes
0answers
107 views

Regulating outgoing traffic on a virtual machine? [closed]

I am making a virtual network setup for my high school cybersecurity team to practice. I am connecting all the VMs together through a VPN and then people who are practicing will VPN in and ssh/remote ...
0
votes
1answer
253 views

Where can I find books or articles about iptables and apparmor?

Where can I find a book or articles that doesnt tell me how to do a ls. Im looking for one where i can learn about: -iptables -apparmor I know there is ufw and gufw and no gui for app armor. I want ...
0
votes
1answer
401 views

Is NAT iptables available in 11.04?

I have an Ubuntu 11.04. I wanted to play around with iptables rules. But I don't see it installed. When I did: sudo iptables -t nat -F chain This is what it returned: iptables v1.4.10: can't ...
0
votes
1answer
1k views

Trouble setting up openVPN/VPN

I'm having trouble setting up a VPN on my VPS that's running Ubuntu 11.04. I'm been following this guide http://tipupdate.com/how-to-install-openvpn-on-ubuntu-vps/ I'm able to start the VPN, but the ...
17
votes
2answers
42k views

How to save rules of the iptables? [duplicate]

I create the rules to iptables. But, when I restart the computer, the rules don't work! How to save the rules on Ubuntu ? The was problem solved! do: After of the write the commands iptables, do: ...
0
votes
1answer
386 views

ubuntu as multi port router

If I have an 4 (or more) ethernet port linux box, How to setup it as router to handle 4 class c subnet ? for example, eth0 => 192.168.1.0/24, eth1 => 192.168.2.0/24, eth2 => 192.168.3.0/24, eth3 => ...
4
votes
1answer
1k views

Iptables Not Blocking User

iptables seems to not want to block a user. I'm using a remastered 10.04 live and Firestarter as a firewall. I've made no fundamental changes to the distro, except to update, upgrade and added this ...
4
votes
1answer
5k views

Do I need to restore iptable rules everytime on boot?

Every time I reboot I loose the iptables rules that took me so looong to enter. I know I can save them and restore them on boot, but is there anyway to save them forever? Do I really need to restore ...
2
votes
2answers
4k views

iptables mac address filtering not work

I block every port default by ufw and add iptables rules like this: sudo iptables -A INPUT -p tcp --dport 1723 -m mac --mac-source 00:11:22:33:44:55 -j ACCEPT then I list iptables INPUT rules: ...
1
vote
0answers
292 views

Cannot FTP without simultaneous SSH connection? [closed]

I'm trying to set up an old box as a backup server (running 10.04.4 LTS). I intend to use 3rd party software on my PC to periodically connect to my server via FTP(S) and to mirror certain files. For ...
1
vote
1answer
1k views

Log destination IP with iptables

I want to log destination IP addresses in my Ubuntu router. I have two network cards eth0 - 10.0.101.254 eth1 - 10.0.101.253 10.0.101.254 is the GW for all hosts on my network. The router ...
0
votes
1answer
309 views

Access VPN from home is fine but not outside via 3G

I'm a real Ubuntu newbie but at the school where I work I managed to install Ubuntu then install pptpd. I was feeling very pleased with myself when last evening from home with my Apple iPhone through ...
4
votes
1answer
4k views

Port forward to a port on the same machine

I used to run a service on port 25570 I'm now changing it to run on port 25565 but I still want people who try to access it on the old port to have access to the service. So I'd like to forward port ...
1
vote
0answers
556 views

PPTP Server - Clients still have original IP [closed]

I have a VPS with an OpenVPN server configured and running without a hitch. However, since I want to be able to use it as a VPN server for my iPhone as well, I've decided to switch to PPTP. I ...
2
votes
1answer
540 views

Looking for IPTABLES and UFW readily available, the best proven rules

ok i am up with UBUNTU finally, and liked the distro! particularly ufw, synaptic and software manager. as i am pretty blind newbie to linux, i need some help securing Ubuntu desktop. I've gone ...
5
votes
3answers
4k views

Is there a recommended default iptables setup?

I've been using ubuntu server for a while, however I have never really invested time into iptables. I was wondering if there was a recommended way to setup iptables on a basic server intall. An ...
2
votes
3answers
2k views

Why is Ubuntu permissive with outgoing connections by default?

I am pretty newbie to Linux, as most of computers for resources in my school use Linux, I just installed Ubuntu to learn. By default iptables and ufw sets policy as under: IPTABLES -P INPUT DROP ...
2
votes
1answer
7k views

Redirect packages directed to port 5000 to another port

I'm trying to use eboard to connect to the FICS servers (http://www.freechess.org), but it fails because port 5000 is blocked (company firewall). However, I can connect to the server through the ...
1
vote
1answer
2k views

How can I set up GUFW so that only firefox connects to the internet

I only want http, https and DNS to be open. I'm having troubles with setting up port ranges in the UFW GUI. How do I input configs into the feilds? Basically, something along the lines of this, but ...
2
votes
0answers
597 views

Is there an application firewall for Linux, like ZoneAlarm [duplicate]

Possible Duplicate: How to control internet access for each program? I've tried Firestarter and Ufw, but in the end, decided to write my own iptables scripts. I basically let http and ...
2
votes
1answer
422 views

Shorewall is breaking packets/sessions when connecting out to internet

I am happy to forward any further data if required like firewall rules etc. Would appreciate if someone can skim through my config and see if there are any glaring errors. Problem: Everything working ...
0
votes
1answer
443 views

Iptables rule for server accessed remotely via DHCP

Sorry to ask this question - but I have been browsing forums and threads on this subject and seem to confuse myself more than actually getting any clarity. All I need is a short and concise answer for ...
3
votes
1answer
888 views

iptables resets when server reboots

Everytime my server reboots it seems I have to reset my iptables to default, I used to use firestarter but removed it a while ago. Is there any settings that are making iptables change when the server ...
3
votes
1answer
9k views

iptables-restore failing to load my rules

I've been searching around for some time now, but nothing solves my problem. I'm setting up a mail server, but when writing to the iptables, I get an error: iptables-restore: line 2 failed. I'm ...
2
votes
1answer
1k views

No client internet access when setting up these iptables rules

I have read many other posts but cannot figure this out. eth0 is my external connected to a Comcast modem. The server has internet access with no issues. eth1 is internal and running DHCP for the ...
7
votes
1answer
2k views

How many instructions can be stuffed into iptables without loosing system sanity?

Say one wishes to have a list of blocked IP addresses. I have seen the following example script: BLOCKDB="/path/to/ip.blocked.file" # omit comments lines IPS=$(grep -Ev "^#" $BLOCKDB) for i in $IPS ...
1
vote
1answer
3k views

Squid proxy server (or iptables) will not let my users send or receive mail

I have an Ubuntu 10.04 box that was once configured as Squid Transparent Proxy. Navigation was perfect: my windows clients had no troubles. The problem I had was that users were not able send or ...
2
votes
1answer
4k views

Which INPUT rules do I need to add to iptables so apt (apt-get, aptitude) can work (update, upgrade, search, install)?

I need to use aptitude to update and install software but it fails. It says... 0% [Connecting to archive.ubuntu.com] ...and halts. I need to type CTRL-C to move out. I'm using Ubuntu Server 10.04 ...
9
votes
3answers
19k views

How can I make a specific set of iptables rules permanent?

Is there a "best practice" or standard to make a few iptables rules permanent? I mean: automatically applied upon a system reboot? I am using a VPS with Ubuntu Server 10.04 LTS (Lucid Lynx). Thank ...
1
vote
3answers
1k views

Block anything from certain IP, injected from ISP when tethering from phone

My ISP injects JavaScript files - most notabily bmi.js - and certain other unwanted additions to web requests when tethering from my phone. It would be OK if the JavaScript was useful, but it is ...
2
votes
1answer
853 views

iptables on desktop

I have some iptables rules and a policy that I want to apply to my desktop. Where is the the configuration file that will make these changes permanent? Is there any issues with using iptables and ...
1
vote
1answer
2k views

How do I add a dyndns alias to my Iptables?

First of all: I'm aware of this old question: iptables allow dyndns domain name and auto update rules But somehow it doesn't help me. The Problem Iptables on my work pc are configured to drop all ...
9
votes
2answers
3k views

potential ufw and fail2ban conflicts

Will running both fail2ban and ufw cause problems? I noticed that fail2ban modifies iptables rules, but ufw already has a ton of iptables rules defined... so I'm not sure if fail2ban will mess these ...
3
votes
3answers
4k views

Bash Script: catching errors in a block of statements

I have a large iptables ruleset that I manage with my own bash script. Most of the commands in the script are simple, single-statment iptables commands. I am trying to improve the script by adding ...
0
votes
1answer
156 views

What should the source be when using OpenVPN?

I'm trying to use OpenVPN on my Ubuntu 10 VPS. I'm trying to route my traffic using this command: iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -j SNAT -to The error I get is: iptables v1.4.4: ...