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

1
vote
0answers
393 views

Multipath routing with only one interface

I have two links that connect to Internet in my office network. One of the routers has ip 172.16.0.1 and the other has 172.16.0.3. They connect to Internet using ppoe so they get an ip each time they ...
0
votes
1answer
78 views

why opening a port is so difficult in ubuntu?

I have searched around and I have run these commands iptables -A INPUT -p tcp -d 0/0 -s 0/0 --dport 5432 -j ACCEPT iptables-save > /etc/iptables.rules And I rebooted the box. I had no luck. ...
2
votes
0answers
165 views

How to forward port to shared wired connection?

I connect to my wireless network through NetworkManager. In addition I have another computer connected to the first one through ethernet. I'm using NetworkManager to share the wireless connection of ...
0
votes
2answers
189 views

using iptables for testing application

I'm testing my webapplication which connects to two DBs. I can't stop them but I want to simulate outage of one of them. So I opened one terminal where I'm pinging DB server: ping 172.21.7.188 In ...
0
votes
1answer
452 views

redirect facebook visit to another webpage [duplicate]

I'm looking for a way to redirect visits to facebook to another website. It's to stop a child from wasting all his time on facebook. We can't use extensions because they are simple to disable so I'm ...
0
votes
1answer
250 views

In iptables is it possible to restrict by gateway?

Using iptables it is possible to add a DROP action for some particular source IP and/or destination IP. I want to know if it is possible to DROP a packet based on (default) gateway used? The iptables ...
1
vote
1answer
982 views

What's the difference between -p tcp and -m tcp in iptables?

I just noticed an entry in /etc/sysconfig/iptables along the lines of -A INPUT -p tcp -m tcp --dport 138 -j DROP I am not so sure why there has to be two switches here for matching protocol TCP, ...
1
vote
1answer
246 views

NAT forwarding not working

I tried to set up forwarding from eth0 to wlan0 in ubuntu: echo 1 > /proc/sys/net/ipv4/ip_forward iptables -t nat -F iptables -F iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE iptables -A ...
1
vote
0answers
517 views

Can't ping KVM guest from another computer

I've set up several KVM guest OSs on my Thinkpad laptop. These guests are all on the 192.168.122.0/24 subnet, while the host OS are in the subnet 192.168.1.0/24 together with another laptop(Dell) of ...
13
votes
1answer
46k views

iptables log file,and how change it

I have this rule in my iptables: iptables -AINPUT -s 192.168.11.0/24 -j LOG My question is: Where is the iptables log file, and how can i change that?
2
votes
1answer
9k views

How can I allow ssh connection from an IP subnet on port 10022 using iptables?

I need to set up a server with public IP for bandwidth testing, and I already have a script to drop all incoming traffic except for the ports I need. I have changed the ssh port from default (22) to ...
1
vote
1answer
449 views

Understanding Iptables

iptables -A INPUT -m state --state NEW -m tcp -p tcp --dport 7000:7010 -j ACCEPT I trying to understand the -m state --state NEW part. Searching through the man pages and correct me if I am wrong ...
9
votes
3answers
2k views

How can I prevent apt-get/aptitude from showing dialogs during installation?

I'm trying to build an Ansible Playbook to deploy some Ubuntu 12.04 servers on Linode, but my problem seems to be an Ubuntu one. When I run different combinations of apt-get or aptitude I always get ...
7
votes
1answer
19k views

Forwarding traffic between 2 interfaces

I have 2 VLANs connected to a 'router'. All the machines can ping other machines within their own VLAN and the router. The router can ping all of the machines. I am trying to get machines to talk to ...
2
votes
2answers
9k views

What do I have to add to this iptables setup to allow mysql access through ssh?

I just want to be able to access mysql through ssh, but I don't want to accept everything as well. What's the most secure way to do this if any. Here are my rules: *filter :INPUT DROP [14:1434] ...
2
votes
2answers
868 views

if-up.d script not working?

I'm trying to make NAT routing persistent on my Ubuntu 12.04 EC2 instance (for OpenVPN; currently I need to run it every time after boot): ubuntu@vpn:~$ cat /etc/network/if-up.d/vpn-routing iptables ...
0
votes
1answer
192 views

iptables forwarding rule

I entered the following rule into my iptables: sudo iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-ports 1337 and then when I went to remove it, I couldn't find it ...
2
votes
1answer
4k views

How can we make our ubuntu server router as gateway mode to router mode?

based on this sample guide link: http://ubuntulinux.co.in/blog/ubuntu/nat-configuration-with-iptables-in-ubuntu/ with this code: iptables –append FORWARD –in-interface eth1 -j ACCEPT it ...
0
votes
1answer
2k views

Connecting to NAT virtualbox guest from bridged network

I've setup a Virtualbox Ubuntu 12.04 server using Vagrant. I can ssh to it and even ping my desktop from it. What doesn't work is to ping the guest OS from my desktop. I've tried to flush the ...
4
votes
1answer
904 views

Why ufw is blocking my outgoing traffic?

Here is my status: $ sudo ufw status verbose Status: active Logging: on (medium) Default: deny (incoming), allow (outgoing) New profiles: skip To Action From -- ...
1
vote
2answers
1k views

How can I fix an iptable_nat compilation issue on Ubuntu 12.04?

I'm facing a problem while compiling iptables module for my 12.04 ubuntu with kernel v. 3.7.1. The problem began with my system unable to show the list of rules for all chains in nat table root:# ...
3
votes
1answer
316 views

Setting up catch-all with iptables

I'm trying to setup a iptables which only allows traffic in via ssh and a catch all that blocks everything else coming into computer. The iptables -L output looks like this Chain INPUT (policy ...
1
vote
1answer
2k views

ntp date not showing the correct time [duplicate]

I was having an issue in which the time my ubuntu machine was showing is 5 hours ahead of my standard time. So I installed ntpd for that using apt-get install ntp after that I restarted ntp but ...
3
votes
1answer
206 views

Prevent a user from accessing the internet, except for certain websites

I'm trying to prevent a specific user from receiving traffic from any sites except specific sites on a whitelist. The easiest way to do this seems to be with iptables, but I haven't been able to get ...
2
votes
0answers
326 views

How do we allow a certain mac address in a FORWARD chain through iptables?

I set the iptables rules in default. # IPTABLES IN DEFAULT iptables -P INPUT ACCEPT iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP How will allow a certain mac address in a forward chain? I ...
2
votes
0answers
1k views

IPTABLES > MAC Filtering

I am newbie. I tried DHCP Mac filtering is not enough to secure our networks and I think iptables will... This is my concept: I set a new laboratory (LAB) network. My other network is connected to a ...
3
votes
2answers
7k views

Create table in iptables

I want to create a custom table using iptables so that I can add my custom chains in it. But I doesn't see any option to do that. I tried to search for it but didnt found anything. Please Help.
2
votes
1answer
3k views

Forward TCP Connections with Iptables

I receive connections to my server from several ip addresses I want to route these connections just like rinetd does but based on the ip the connection is coming from to connect to a specified host. ...
1
vote
0answers
551 views

UFW Firewall Rules, has a hole in it. Please help

Can someone please look at the below output for me. I have my UFW on deny/deny, and here are the rules. But if I leave my Ubuntu Server on, with a Windows XP VM, and let Instant Messenger run in the ...
0
votes
1answer
42 views

About ubuntu as server and configuring ip tables [duplicate]

Please help me to setup a linux based server machine for sharing internet connection in my network. Since I am a new user, please assist me ...
1
vote
1answer
161 views

iptables help needed in 1304

I've setup my raring-ringtail machine and decided to use iptables after removing ufw to have more control over my network security. However, I'm stuck at one point. First, I've set default policy to ...
2
votes
1answer
2k views

OpenVPN - Routing issue

Server: Ubuntu 11 (Openvz VPS) Client: Windows 7 Issue: clients connect successfully to VPN, but loss of internet access once inside the VPN. Facts: Everything mostly defaults Is a ...
7
votes
0answers
320 views

How can I run a command from a qml script? [duplicate]

I'm working on an Ubuntu Touch app that needs to modify iptables and do various other things that requires interaction with the command line. I found this and I understand that it must be done with a ...
1
vote
2answers
158 views

Simple shell script

I am quite inexperienced when it comes to Linux and now I am setting up the system. What I want to do is to write a shell script, that will do two things: Start i2prouter - as I do not want it to ...
2
votes
1answer
774 views

Shorewall IP Forwarding Problems in 12.04 LTS

Internet connectivity through my 12.04 LTS shorewall box is spotty at best. Ping works both locally and to the internet with no dropped packets (from both the box itself and internal LAN). HTTP ...
1
vote
0answers
434 views

New Server - apache will not serve outside LAN

New server, running well 12.04 LTS on HP ML350. Apache = great, inside our LAN. Apache = timeout, from WAN (NAT forwarded from firewall). I have cleared all Iptables, read & checked every ...
4
votes
1answer
585 views

Could someone tell me whether my OS is communicating with the internet?

I edited iptables so that when the VPN service is disconnected, no program will access the internet. Well, I did an experiment. I disconnected the VPN service manually and immediately did a ping by ...
1
vote
1answer
188 views

Blocking MAC Address does not work on DHCPv6 request

I blocked a MAC address of a client on my DHCP Server running on Ubuntu 12.10 using iptables -A INPUT -m mac --mac-source -j DROP But I am still getting DHCP requests from the client and the ...
1
vote
1answer
627 views

Block all non-squid traffic for PPTP users

I have squid running on a transparent proxy (port 3128) and VPN clients connecting + ip forwarding via PPTPD. I want to allow users to connect to port 80 (3128) but block all other TCP traffic. I am ...
0
votes
1answer
441 views

Change UDP port with iptables for VPN clients

What I want to do is say that for all UDP connections on interface ppp0 that have a destination port of 53, change that destination port to 1053. I am attempting to change the destination port of UDP ...
2
votes
2answers
2k views

How do I make Youtube videos stream faster on my ubuntu?

According to this article, http://thetechblock.com/how-to-stop-isps-slow-youtube/, I can make Youtube videos stream faster on Linux, but I am not entirely sure how to carry out similar commands on the ...
0
votes
1answer
68 views

How do I know if iprules are used?

I followed this: How to save rules of the iptables? And created this "/etc/iptables.rules": # Generated by iptables-save v1.4.12 on Sun May 19 18:42:18 2013 *filter :INPUT ACCEPT [429624:571594561] ...
4
votes
1answer
4k views

Internet connection sharing without Network Manager

I followed these instructions for setting up a shared internet connection with iptables. Specifically, I: Added a network interface for my second NIC in /etc/network/interfaces like so: auto eth1 ...
0
votes
1answer
2k views

Something is closing port 443?

I have Ubuntu 12.04 Server installed and serving a Ruby on Rails app with Apache and Passenger. I'm using iptables to control traffic. Yesterday, I setup Apache to use SSL for the site. After setting ...
0
votes
1answer
520 views

I can ping some host but not all from network on OpenVPN tun

I have a network I want to connect to which is behind a firewall (iptables). On the same PC there's the OpenVPN server. It's directly connected to the Internet. I can connect to the server through ...
1
vote
1answer
406 views

redirect traffic from 2 Ubuntu external NICs to specific internal hosts

I am having problems redirecting incoming traffic to 2 external facing interfaces on my Ubuntu 12.10 server to 2 separate internal hosts. I am able to redirect incoming traffic on my eth0 just fine to ...
1
vote
1answer
5k views

Iptables on Ubuntu Server does not open ports

Does Iptables need ufw to work? I tried unsuccessfully open 4447 on my ubuntu server 12.10 using iptables. Did: server:~# iptables -A INPUT -p tcp --dport 4447 -m state --state ...
2
votes
2answers
4k views

UFW 'default deny incoming' doesn't work

I have UFW enabled, 'default deny incoming' set and no any additional rules, but I still can access all ports from other PCs. I have to manually block each port. What can be wrong?
7
votes
1answer
15k views

iptables doesn't redirect http traffic to my Squid proxy!

I arranged a transparent Squid proxy which listens to port 3128 on localhost, to block some web sites. I've tested the proxy using Firefox, and it works. Then I ran this, hoping to redirect all the ...
0
votes
1answer
664 views

Iptables proxy host on port

I have 2 servers from 2 different companies The first server is a VPS where i host my websites (lets say it has IP 5.5.5.5) The second server is a Minecraft server (lets say it has IP 6.6.6.6) On my ...