Questions tagged [dnat]

101 questions
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
  • 302
  • 4
  • 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…
stecog
  • 985
  • 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
0
votes
1 answer

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 -> eth0's public ip:2002 172.16.0.3:22 -> eth0's public ip:2003…
rralf
  • 121
  • 3
0
votes
2 answers

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 http://172.17.0.2 and get web page from…
ceth
  • 526
  • 1
  • 7
  • 16
0
votes
1 answer

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 range of 10 ports on which they can expose their…
Michelle
  • 923
  • 5
  • 20
  • 30
0
votes
1 answer

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 offers a better bandwidth. Both gateways do SNAT for…
flight
  • 394
  • 4
  • 14
0
votes
1 answer

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 DNAT rule it is not working. What can be the…
kevin
  • 191
  • 5
  • 16
0
votes
2 answers

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 server configured to give IP addresses between…
John
  • 1
  • 2
0
votes
2 answers

NAT with iptables: need help understanding

i am trying to learn NAT with iptables but i ran into some confusions. i am having two virtual machines with ips 18.43 lets say B and 18.42 C running webservers on port 80. i need to NAT every traffic coming on B:80 to C:80 (Do not want to use any…
Kevin Parker
  • 757
  • 1
  • 13
  • 32
0
votes
0 answers

Nftables DNAT from external to internal interface and different port where Web server is binded to, how?

There is multihomed Ubuntu 22.04: internal 192.168.0.99/24 external 12.12.12.12/29 (for example) acting as gateway also. All, including internet access from the server as well as from the Lan behind works, that is IP forwarding is on, SNAT is set…
0
votes
0 answers

iptables PREROUTING DNAT

Server 1: 192.168.0.1 Server 2: 192.168.0.2 Server 3: 192.168.0.3 Server 2 has access to server 3 on port 1521 The task is to make port forwarding from Server1 -> Server2:5501 -> Server3:1521 On Server2 I perform the settings: echo 1 >…
AlexD
  • 1
0
votes
1 answer

DST-NAT for port tcp/80 on Mikrotik router

I am trying to redirect the incoming traffic to tcp/80 of the public IP interface of Mikrotik router to the internal server with reverse proxy. No matter what I do, the NAT rule does not work with tcp/80 as dst-port. If I change it to the tcp/8080…
japol
  • 1
  • 1
0
votes
1 answer

iptables rules - Forward/Masquerade sevices using nat table

I need to complete an exercise with iptables on a network (docker containers) configured as follows: A router host with 2 network interfaces (eth0 <- public 10.9.0.0/24; eth1 <- lan 192.168.60.0/24; the router is the x.x.x.254 on both networks) and…
Giuseppe
  • 101
  • 2