The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
30 views

Prerouting with iptables, destination port to DHCP ip

I have an iptables rule that translates requests to the same IP from different internal hosts by changing the source port. iptables -t NAT -A POSTROUTING -p TCP -d 173.32.1.2 --dport 873 \ -m state ...
0
votes
1answer
39 views

policy routing to guests on other server

After long searching I've found the answer to my challenge, but the last step fails. I have two identical servers that both serve multiple guests. The servers have two interfaces: one for the ...
1
vote
1answer
22 views

Forwarding ports from one bridged interface to a guest container on host OS

I have a simple configuration. Mind map how everything look like So I have a structure: Proxmox Host OS (vmbr0, vmbr1) Container 1 (eth0) Container 2 (eth0) The Proxmox networks: vmbr0 ...
0
votes
0answers
27 views

Port forwarding with different gateway

Here is my current setup: Public IP -> Iptables firewall_A with DNAT from Public IP to -> mail server Iptables rule: iptables -t nat -A PREROUTING -d PUB.LIC.IP.ADD -p tcp --dport 25 -j DNAT ...
0
votes
2answers
23 views

port rerouting with iptables not working

I want to reroute all traffic from a port e.g. 4445 (from localhost) to another port on another machine in the LAN e.g. 3305. I expected this should do the deal: iptables -A PREROUTING -t nat -i eth0 ...
1
vote
0answers
34 views

iptables/nat/prerouting ignores UDP packets?

The same effect on many servers with various kernel versions. There are multiple Iptables DNAT rules: iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 12345 -j DNAT --to-destination ...
1
vote
1answer
67 views

Iptables DNAT single port

I'm trying to redirect a single port to a local server via IPtables. Currently I have the following rules: iptables -t nat -A PREROUTING -p tcp -m tcp --dport 55555 -j DNAT --to-destination ...
0
votes
1answer
135 views

Squid 3.5: Preventing forwarding loop in intercept mode

I have set up a router and an intercepting HTTP squid proxy on different machines. Clients should use the proxy (without knowledge) in the following way: Client -> Router (DNATing to proxy server) -> ...
1
vote
2answers
44 views

iptables DNAT broadcast address

I'm having trouble using iptables to change the destination address of a broadcast packet. I have read several places that iptables/Linux won't forward broadcast packets, so I'm looking for ...
1
vote
0answers
150 views

How to forward one ip to another using iptables on android [closed]

So if got iptables on android. There is an app on my phone which connects to a malicious hardcoded ip (lets call it 192.168.100.1) and sends some data. I want to redirect all http traffic to that ...
2
votes
1answer
73 views

iptables nat table is not changing destination IP in PREROUTING?

OK, so on a vanilla Ubuntu 14.04.2 install, i run the following commands: sudo bash -c 'echo 1 > "/proc/sys/net/ipv4/ip_forward"' sudo iptables -t nat -A PREROUTING -d 192.168.100.1 -j DNAT ...
0
votes
0answers
91 views

iptables POSTROUTING DNAT Issue

So I am attempting to do something along these lines but hopefully with a single router instead of two. My network is as follows: Device 1 <--> (Interface A | Interface B) <--> Device 2 ...
1
vote
2answers
89 views

UDP packet comes to VPN interface and is not delivered to the process

I have a server X (45.55.245.182) which is connected to server Y by VPN. VPN interface on X is tap0 with ip 10.200.0.2; VPN interface on Y is tap0 with ip 10.200.0.1. I run netcat on server Y to ...
0
votes
1answer
34 views

iptables DNAT to external IP without masquerading does not work

On server 1.1.1.1: iptables -t nat -A PREROUTING -p tcp --dport 20000 -j DNAT --to-destination: 2.2.2.2:20000 iptables -t nat -A PREROUTING -p tcp --dport 20000 -j LOG --log-prefix pre20k iptables ...
0
votes
1answer
64 views

Why does iptables not doing DNAT for the same subnet? [duplicate]

I have the following NAT setup: +--------------+ +-----------------------+ +-------------------+ | | | | | | | | ...
0
votes
0answers
47 views

IPTABLES Forward a Input with specif dport to VPN and masquerade

Inside our company we have a XMPP server that works with source 10.0.0.0/8. But, What I want to do is redirect a package coming from WAN to the VPN (which is where our XMPP is located) but doing a ...
0
votes
1answer
211 views

Original IP lost with IPTables NAT to another server

I'm trying to forward all HTTP traffic from one EC2 linux server (external IP 11.11.11.11) to another one (external IP 22.22.22.22), these rules set: sudo iptables -t nat -A PREROUTING -p tcp --dport ...
-1
votes
1answer
59 views

Iptables DNAT working in my own network, but not through VPN

For some reasons I need to switch a server ip to another ip, in order to be seen by another computer elsewhere through vpn. So I'm using iptables (didn't know any of that until yesterday) and testing ...
0
votes
1answer
54 views

NAT forwarding (whole IP) working only on some ports

Since my hoster doesn't allow briged setups I had to go for a NAT solution to run my CentOS VM on an additional IP and my host machine on the primary IP. Now, I've got a problem since for ports 22, ...
-1
votes
1answer
94 views

rewrite destination IP of TEEed traffic

Server 1 and Server 2 (Centos 7) both host the same application, which listens on UDP port 1514. Server 1 receives traffic on this port. The goal is for the application on Server 2 to receive a copy ...
1
vote
0answers
75 views

iptables foward to multiple interfaces with NAT

I want to use iptables for provide NAT translation and forward the packets out a different interface. The network set-up is as follows: Alias: eth0:220 with IP address 10.1.1.220 / 255.255.252.0 ...
-1
votes
1answer
64 views

How do hosting providers give each container a unique public IP? [closed]

I'm looking in to starting my own hosting company; even if I'm only paid in experience. At first, I thought I'd create shell scripts to automate the creation of OpenVZ containers. But then I ...
1
vote
1answer
748 views

Using host's iptables to prevent access to docker-container's exposed ports

I have a host which runs a few docker's containers. This host has a few network interfaces, my goal is make some exposed ports from containers accessible only by certain interfaces, and prevent ...
0
votes
0answers
238 views

iptables DNAT packets into an openswan IPSEC tunnel

I have the following network setup: +-----------------------------------+ | | ...
1
vote
1answer
1k views

Why some iptables DNAT rules don't work until reboot?

My iptables DNAT rules don't work until reboot. If I reboot my server, all of the rules work. Desciption of the architecture : Tens of hosts (senders) send some UDP packets (one-way on a specific ...
0
votes
1answer
84 views

DNAT in Shorewall not working for VPN

I have a firewall (10.8.0.1) connected to an internal server (10.8.0.2) via VPN. On the firewall the VPN interface is called tun0. So in my shorewall configuration I have this: $ cat interfaces #ZONE ...
0
votes
1answer
275 views

Port redirection with iptables to localhost / blocking the destination port

I like to forward all traffic coming to 80 to be redirected to 8000. I used iptables -tnat -A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8000 But then port 8000 is still open to ...
0
votes
1answer
123 views

iptables: DNAT configuration FTP service

Hi have a FTP server behind a firewall and have problemi with DNAT configuration, internal server have ip 192.168.4.110: iptables -P INPUT ACCEPT iptables -P FORWARD ACCEPT iptables -P OUTPUT ACCEPT ...
0
votes
1answer
54 views

iptables dnat mapping to specific ip

I constructed a private net with two machine, both of them have two network interfaces this is the networking information: machine1: eth0 10.0.0.11 (private net) eth1 10.82.80.208 (Campus Network ...
0
votes
2answers
448 views

Port forward with iptables

I got lo (127.0.0.1) and eth0 (172.17.0.8). I want to redirect packets that land on 127.0.0.1:80 to 172.17.42.1:80 (route from eth0). I tried iptables -t nat -A OUTPUT -p tcp --dport 80 -d 127.0.0.1 ...
1
vote
1answer
185 views

Are iptables prerouting (DNAT) packet changes visible to subsequent chains?

I was reading Rusty Russell's NAT Howto when I came across this section: 6.2. Destination NAT This is done in the PREROUTING chain, just as the packet comes in; this means that anything else on ...
0
votes
2answers
151 views

use iptables's nat to proxy mysql

I find this similar thread but don't work: http://stackoverflow.com/questions/10864854/forwarding-mysql-connection-with-iptables-and-differents-network-interfaces?rq=1 My environment as follows: ...
3
votes
1answer
4k views

Proxmox Nat Networking Issue

Definition I have installed Proxmox 3.2 and i am trying to configure a virtual machine as a communication server that handles all traffic and forwards them to the nodes with private ip. I ...
1
vote
1answer
58 views

Linux iptables DNAT 53306 to 127.0.0.1 3306

mysql real port is 3306。 I want public network using 53306 to visit mysql,and 3306 not allowed access from public network. How to write the iptables rules DNAT 53306 to 127.0.0.1 3306 ? help me
1
vote
1answer
290 views

Redirect traffic from one server to something.cloudapp.net (CNAME) [closed]

Through out North America, we have lots of legacy devices, which sends data to our server which has static IP Address. Now we are moving to Azure cloud services, and as you know they do not guarantee ...
0
votes
1answer
238 views

iptables NAT forward range

I have two network interfaces, eth0 and eth1. eth0 has a public ip, eth1 has 172.16.0.254/24. I'd like to do the following mapping: 172.16.0.1:22 -> eth0's public ip:2001 172.16.0.2:22 -> ...
2
votes
1answer
1k views

Reply on the same interface as incoming with DNATed IP

A server has 3 ifaces, 2 internal (eth1/2) in different public networks, one external (eth0). There is a service (openvpn) that can't bind to some IPs/ifaces, only to all or one, but I need it to ...
0
votes
2answers
346 views

Forward web request to another computer

I have one notebook and two servers: ip = 172.17.0.2 (I have installed nginx here) ip = 172.17.0.3 (There is nothing here, but I can ping 172.17.0.2 from here) I open browser on my notebook, open ...
2
votes
0answers
103 views

Some packets are dropped in [wan-local], when DNAT rule exists

I am running EdgeOS (aka vyatta 6.3 aka debian) with 3.4.27. There are two DNAT port forwarding rules like this: rule 1 { destination { port 65432 } inbound-interface eth0 inside-address { ...
0
votes
1answer
546 views

netfilter DNAT rule doesn't work for local traffic

I have a webserver hidden behind a firewall. A DNAT rule on my firewall makes it reachable for visitors from the internet. The rule works for traffic from the internet. Unfortunately it doesn't work ...
2
votes
2answers
276 views

DNAT from localhost (127.0.0.1)

I'd like to set up a TCP DNAT from 127.0.0.1, port 4242 to 11.22.33.44, port 5353 on Linux 3.x (currently 3.2.52, but I can upgrade if needed). It looks like the simple DNAT rule setup doesn't work, ...
3
votes
1answer
8k views

port forwarding through AWS VPC NAT

Yes, I have already scoured the internet and read most of the popular IPTables / DNAT guides / pages / posts. My Problem Summary I have a VPC with several subnets. One subnet in particular requires ...
0
votes
1answer
78 views

Do any applications using port forwarding require the SNAT address = external DNAT address?

We use iptables to implement SNAT for our users with a dozen external IP's in round robin (for load balancing). Our developers require port forwarding to their machines and have each requestded a ...
0
votes
1answer
2k views

iptables with DNAT and multiple gateways: How to route replies to correct gateway?

I have a problem setting up iptables rules and routes on a Linux client for a scenario with DNAT and multiple gateways: We have two gateways to the Internet. The first has a fixed IP, the second ...
1
vote
2answers
523 views

iptables: filter before DNAT

iptables -t filter -A OUTPUT -d 1.2.3.4 -j DROP iptables -t nat -A OUTPUT -p tcp -m owner --uid-owner abc -j DNAT --to 127.0.0.1:121 First rule does not work because nat it processed before filter. ...
0
votes
2answers
675 views

NAT from Pvt ip to PublicIP

I have a gateway machine with 2 NIC: eth0 with public IP and eth1 with private IP. On eth0 I have 4 public IP aliased, I wanted to NAT public IP to private IP and I used DNAT to do that uisng ...
0
votes
1answer
46 views

DNATing multiple ips not working

i have centos box with public ip on eth0 and private ip on eth1,4 pub ips are aliased on eth0. I have written DNAT rule to NAT request on 1.1.1.3 to 10.10.10.3 it worked fine, but when i add more ...
0
votes
2answers
1k views

ASA 5505 outside access for clients with dynamically assigned IPs, no outside access for clients with static IPs

We have an ASA configured to access the internet, which works fine for clients who have an IP address assigned by DHCP, but not for clients with manually assigned IPs. For instance, with the DHCP ...
1
vote
1answer
50 views

DNAT generically?

How would you setup iptables to generically send packets of some port say tcp port 80 to the correct machines (which are not all in the same subnet)? For ex: iptables -t nat -A PREROUTING -s ...
1
vote
0answers
115 views

NAT Public ip to that many number of pvt ip

i have a Linux box with two interfaces one with ip 10.10.18.2 and other with ip 192.168.1.2,192.168.1.3 aliased. A xen host is connected with ip 10.10.18.3 and gateway 10.10.18.2 to this through a ...