Questions tagged [dnat]

92 questions
0
votes
0 answers

Infos about iptables DNAT/REDIRECT to local

I'm using Qubes OS, a system based on the Xen microkernel, which let you run easily multiple Virtual Machines and compartmentalize your digital life. All the domains are connected by default (through virtual interfaces) to a FirewallVM which is…
JumpAlways
  • 143
  • 3
  • 9
0
votes
2 answers

How to DNAT Broadcast Packets

I am working on a project where I have to DNAT some broadcast packets to a remote machine IP Address. So far I have learnt that IP-tables can only DNAT unicast packets and it does not DNAT broadcast packets. I am looking for a software that can…
0
votes
1 answer

Redirection (ip nat static) with filtering

I want to apply a D-NAT on my Cisco router to access my management IPBX server via the Internet and I have successfully done it with this command: (config)# ip nat inside source static tcp 10.1.1.254 80 41.25.130.47 8080 and to access to my server…
Paul
  • 1
  • 1
0
votes
0 answers

Port forward port 25 on a Firehol instance

I am trying to port forward through a Firehol box to my email server on port 25: clienta:25 > firehol > email:25 This is a non-transparent connection. The command I am trying is: nat4 to-destination [email-ip]:25 dport 25 For simplicity for now,…
dthree
  • 347
  • 1
  • 8
  • 24
0
votes
0 answers

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 --state NEW,ESTABLISHED -j SNAT --to-source…
devil0150
  • 101
  • 4
0
votes
1 answer

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 external IP's I got from my ISP and one for an internal…
user45156
  • 41
  • 2
0
votes
2 answers

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 -p tcp --dport 4445 -j DNAT --to…
Sim
  • 111
  • 6
0
votes
1 answer

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 -t nat -A POSTROUTING -p tcp --dport 20000 -j LOG…
rlib
  • 195
  • 1
  • 1
  • 7
0
votes
1 answer

Why does iptables not doing DNAT for the same subnet?

I have the following NAT setup: +--------------+ +-----------------------+ +-------------------+ | | | | | | | | | | | …
Kintarō
  • 181
  • 2
  • 7
0
votes
1 answer

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, 80 and 443 this works as expected. I reach my…
Martin Müller
  • 139
  • 1
  • 7
0
votes
2 answers

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 of this traffic. Server 1 uses iptables to…
0
votes
0 answers

iptables DNAT packets into an openswan IPSEC tunnel

I have the following network setup: +-----------------------------------+ | | +------------------------+ | …
0
votes
1 answer

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 INTERFACE OPTIONS - lo …
Matthias
  • 282
  • 3
  • 16
0
votes
1 answer

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 iptables -t nat -A PREROUTING -i eth0 -p tcp…
hellb0y77
  • 955
  • 5
  • 11
  • 21
0
votes
2 answers

use iptables's nat to proxy mysql

I find this similar thread but don't work: https://stackoverflow.com/questions/10864854/forwarding-mysql-connection-with-iptables-and-differents-network-interfaces?rq=1 My environment as follows: Computer A has two network interfaces: eth0…
lost_in
  • 3
  • 2