1
vote
3answers
66 views

drop ips with iptables from awk result [closed]

I have a log file like this : Frq:15 IP:0.0.0.0 Date: 2014-03-21 12:19:31 AM Frq:9 IP:198.252.206.25 Date: 2014-03-21 12:19:31 AM Now i get column of ip addresses with awk : cat /tmp/test | awk ...
0
votes
0answers
32 views

CONNMARK on rewritten packets

I have tried to ask this question on superuser, for it, being a custom setup, belongs there, but that got no answer even with a bounty. I have a host, on which I rewrite saddr and daddr of IP packets ...
0
votes
0answers
65 views

Why is an ack response being sent to the wrong gateway?

I was trying to determine why a packet forwarded by iptables to my internal lan is returned on the wrong gateway. Having investigated this further, I determined that, at least in the case of one of ...
0
votes
0answers
43 views

Where can I find the range of IP addresses of my container OpenVZ

I'm looking for the "range of IP addresses of my container"... Where can I find those ? /etc/network/interfaces ? ifconfig ? I don't know and I can't find any answers... I need it for this tutorial ...
0
votes
2answers
89 views

Forward the Wan IP to another Wan IP without changing the source address

I have tried this case by using the NAT function in iptables but fail example. PC A IP is 1.1.1.1 (Win7) My Server IP is 2.2.2.2 (CentOS 6.2) target Server B is 3.3.3.3 (Windows server 2003) Flow: ...
5
votes
4answers
715 views

Openvpn, forward packets very slowly

I rebooted my server, and an odd issue just came out. I am running on ArchLinux, the clients are Ubuntu, Android and Mac. The problem is that accessing the internet via the clients is slow, about ...
0
votes
1answer
56 views

How open ports in INPUT chain, only for a target IP, with iptables?

I have a server Debian 7 Wheezy, with 2 assigned IPs. I have different service on different port assigned to the IPs. How can i set iptables rule, to work only with one of IP? Example: I Have 2 IPs: ...
0
votes
1answer
72 views

Using Linux's netfilter to reflect packets

I've got a pair of hosts with very bad routing between the two, but I have a third host that has very good ping to each. To work around the bad routing, I'm setting up the third host to bounce packets ...
1
vote
2answers
77 views

Forward 192.168.1.x to 95.211.x.x

I want to forward an internal IP address to an external one. So here's what I do: echo 1 > /proc/sys/net/ipv4/ip_forward Then I use iptables: iptables -t nat -A PREROUTING -s 192.168.1.x -j ...
1
vote
2answers
841 views

Does IP forwarding on Linux act as a reverse proxy?

I have looked around and have seen many IP forwarding solutions that forward requests from an IP on one server to another IP on another server. (Basically, the forwarding of requests going to ...
0
votes
0answers
104 views

How to allow only a country on APF

How I can block all countries and just allow connections from IPs from Brazil to my server using APF? I've searched some ways but none are using APF at all. Some of them make me download a huge list, ...
0
votes
1answer
79 views

Forward packets on different private IPs and interface aliasing

I have a server with 2 public IPs. I configured interface aliasing to hold the second IP: # ifconfig vmbr0 Link encap:Ethernet HWaddr 4c:72:b9:4f:18:5f inet addr:public.ip.number.1 ...
41
votes
5answers
3k views

Why is tampering with the TTL of IP dangerous?

I've been reading the iptables man-page (light bedtime reading) and i came across the 'TTL' target, but it warns: Setting or incrementing the TTL field can potentially be very dangerous and ...
0
votes
1answer
125 views

Virtual network for reproducible tests

Im developing a software product that uses networking features like device bonding an multi-homing protocols. As with any protocol development, test-code needs to take latency, package-dropping etc. ...
0
votes
0answers
74 views

CentOS 6.3 iptables IProtation

I want to setup IP rotation on CentOS 6.3 VPS. I've few IPs to play around. I've tried following iptable rules (which I got it from some other forum), but not much help. iptables -t nat -I ...
1
vote
1answer
221 views

Setting up IP masquerading by passing packets through external nodes

I'm trying to find a solution to prevent remote machines determining the source IP of my webserver. This is to hide the webserver's actual IP, helping avoid DDoS attacks. Incoming requests are ...
2
votes
2answers
1k views

iptables “host/network not found” with an exclamation mark IP address

I'm trying to add a iptables rule in order to drop any incoming packets except those from a specific IP. Following the manual, I try to run this: > iptables -t filter -I INPUT -s ...
0
votes
1answer
103 views

IP logging on a Linux access point [closed]

Here I'm using my RaspberryPi as a WLAN router. It is connected to my LAN by wire (which leads to my DSL router), additionally it is equipped with a USB WLAN stick. I'm using hostapd for providing the ...
0
votes
2answers
572 views

How do I configure dd-wrt to forward IP Protocol ID 50 & 51 traffic to an internal machine?

Please note, I'm not talking about TCP or UDP traffic. Rather IP traffic with the protocol ids of 50 and 51. The point of this being that I can then pass IPsec traffic thru to the internal machine ...
1
vote
2answers
614 views

Deny IP address on AWS ELB

I've, more or less, following configuration on AWS: Elastic load balancer with 3 machines o 3 different availability zones. My security group allows 0.0.0.0/0:80 as it's my rails application (nginx, ...
-1
votes
1answer
149 views

Can I allow only TCP connections from inside my network, using iptables on Ubuntu?

Currently, I'm allowing all TCP connections to port 80 on my : -A INPUT -p tcp --dport 80 -j ACCEPT I'd like to allow all TCP connections to port 5432, but only from my local network. Is there a ...
4
votes
2answers
324 views

Multiple IPs, one interface - How to configure outgoing connection with different IP?

I have configured eth0 with 8 IP also add proper virtualhost in apache for different IP and everything works almost fine. When the script (like PHP,ruby) lauched by apache2 try to make outgoing ...
1
vote
0answers
213 views

iptables dynamic NAT, SNAT: force overload on exhaustion

Is there a way to specify the use of iptables NAT'ing where you can use SNAT for a pool of outside addresses, but when the last IP is about to be used it is used as an overloaded outside IP? I ...
1
vote
0answers
279 views

switch OFF syn cookies

We have several servers they have public IP's, but work together (one is with Load Balancer, orther with Apache Web server, other with MySQL and so on. Most of the ports are fire-walled, so only ...
-1
votes
1answer
72 views

Binding IPs to non-root users

I want to bind IPs to non-root users so that all outgoing applications will use that IP for the user. I have this: iptables -t nat -A POSTROUTING -m owner --uid-owner xxx -j SNAT --to-source ...
-2
votes
2answers
288 views

rhel routing without NAT using iptables

I need to set up routing, preferably with iptables, that does no NAT. Basically I will have a number of clients on subnet 192.168.1.0/24 and they need their traffic to go through a gateway, say ...
2
votes
2answers
924 views

iptables: Allow port range but deny to certain IP

I am running a server which needs UDP ports 1000:11000 opened, as well as TCP 10011 and 30033 open to function. I have a set of iptables rules set to allow SSH and those ports, and intentionally left ...
0
votes
1answer
1k views

IP Table, what does this construct mean ::INPUT ACCEPT [0:0]

I am looking at an IP Table construct, what does the following mean : :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] thanks
0
votes
1answer
96 views

need to my server's ip changes when it needs to connect port 'x' on ip 'y' [closed]

I have a linux server and have a proxy server on another machine. My linux server needs connect to port 'x' on ip 'y' Is it possible to create iptables rule or another way to: when my linux server ...
3
votes
1answer
567 views

iptables preroute localhost

I would like to forward all incoming traffic from a certain port to another one using iptables. The problem is that prerouting doesn't work for traffic from localhost. This topic suggests a solution: ...
0
votes
1answer
85 views

Network Table assistance [closed]

I am designing a small network and have came up with the following table I am just wondering if this seems right, would appreciate some feedback, thanks. Network/Router First IP Last IP ...
0
votes
1answer
574 views

Using iptables to redirect according to pattern-matching (--string)

what I want to do is to redirect web traffic in this way: Every request to port 80 that HTTP GETs a given address should be redirected to a particular port (4444). Every other request goes to port ...
2
votes
3answers
462 views

Disable static IP addresses on desktop computers

Is there any way of not allowing users to statically set an IP address on their machines? We have a lot of servers with static IP addresses and also a DHCP server. I am afraid of allowing users to ...
1
vote
3answers
4k views

How Do I Block an IP Address on ubuntu?

I have configured Ubuntu machine as router. Steps of NAT configuration are given below: #iptables -F #iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE #iptables-save ...
1
vote
2answers
1k views

backup static route on linux router

How do I set up a backup static route on a linux router. For example if I have 2 routers R1 and R2, connected through a switch, through two links: R1(eth1)->switch->R2(eth1) R1 ...
1
vote
2answers
753 views

port redirection through a VPN

I would like redirect my tcp traffic to IRC throught a VPN. I mark the packets with iptables and create a new route for this packets: echo 1 > /proc/sys/net/ipv4/ip_forward echo 0 > ...
0
votes
2answers
202 views

Where do I learn about IP blocks and subnets? Or is there just a calculator that does it all for me? [duplicate]

Possible Duplicate: How does Subnetting Work? Amazon's elastic compute tool (among others) requires the ip block format for their command: ec2-authorize websrv -P tcp -p 80 -s ...
0
votes
1answer
238 views

Netfilter/iptables - Accept connections from an DNS CNAME

So I'm trying to accept connections on port 80 only from those IPs whose reverse DNS has a CNAME alias like, for example, *.test.mydomain.com: 1.1.1.1 resolves to boo.foo.com and ...
1
vote
1answer
435 views

iptables: redirect port to server that's bound to a specific IP

On a Linux box with multiple IPs, I'm having a problem redirecting a privileged port to an unprivileged port on which a server is listening that's bound to a specific IP. Add this rule to iptables to ...
2
votes
2answers
57 views

Firewall requests that think you're another host

I'm a bit of a noob so bear with me. I routinely check my logs for fun and I got many (thousands) of these errors: http://pastebin.com/i0iSKDCW The server I'm having problems with is a Burst.net VPS ...
0
votes
2answers
479 views

Trying to enable network address translation on iptables

I have an vps which has two interfaces: lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 ...
0
votes
3answers
453 views

Is this how ARP works? [closed]

A wants to send a datagram to B. A knows B's IP address. However B's MAC address is not in A's ARP table. So A broadcasts an ARP query packet to all machines on the LAN. B recognizes it's IP, so it ...
3
votes
2answers
1k views

Allowing traffic only from a specified IP addresses using iptables

I have a dedicated server (which I only use a lab/testing environment). On the server CentOS 5.6 is running and it is functioning as a KVM host. To secure things a little I want to do the following ...
2
votes
1answer
2k views

Bind process or user to specific IP (Linux)

I have 3 non-root users on my server, and I want to give to each of them the different IP addresses (I have multiple IPs on one network inteface). For example, user1 will have 192.168.1.2, user2 - ...
1
vote
1answer
435 views

Documentation on Kernel variables

I was wondering if some one can point to some good documentation which can give me detailed information about some kernel variable. I am right now mostly interested in the following variables / ...
1
vote
3answers
2k views

hosts.deny not blocking ip addresses

I have the following in my /etc/hosts.deny file # # hosts.deny This file describes the names of the hosts which are # *not* allowed to use the local INET services, as decided # by the ...
2
votes
2answers
653 views

Public IP behind NAT firewall

I have a Linux NAT Firewall serving a virtual machine infrastructure. Right now all the VMs use NAT, but I'd like to have some of them to use a public IP that is not NATed. I have a range of IPs: ...
0
votes
1answer
382 views

How can I allow or deny a particular ISP network

Is there any way to get the network IP of a particular ISP so that I can allow/block the entire network behind that IP using iptables.
0
votes
1answer
66 views

The security policy of netfilter on IP Options

On BSD, with packetfilter, we have an option allow-opts. If it's correct, this option permits in IP options in the IP datagram to be an allowed or forbidden traffic. What is the policy in netfilter? ...
3
votes
2answers
870 views

Why is iptables not dropping packets?

I have the following rule in our iptables config file /etc/sysconfig/iptables -A INPUT -s 84.23.99.97 -j DROP And when I do iptables --list I get the following Chain INPUT (policy ACCEPT) target ...