In computer networking, Network Address Translation (NAT) is the process of modifying IP address information in IPv4 headers while in transit across a traffic routing device.

learn more… | top users | synonyms

1
vote
0answers
309 views

openswan l2tp/IPsec VPN server (NAT'ed)

I have searched for a solution for this problem for a few days now and cannot seem to find anything close to my situation (server is always NAT'd and clients are sometimes NAT'd). I am trying to ...
0
votes
1answer
53 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 is not allowed access from public network. How to write the iptables rules DNAT 53306 to 127.0.0.1 3306?
2
votes
2answers
95 views

Temporary redirect ports

I need a temporary redirection of some ports to another machine. I've tried: iptables -t nat -A PREROUTING -p tcp --dport 4321 -j DNAT --to-destination 192.168.121.4:80 But shorewall blocks all ...
0
votes
1answer
115 views

Routing internet on NAT server thru Squid proxy

I've configured a Squid proxy and a NAT instance and both are functioning fine. Now I want to configure a proxy server on the NAT instance so that the internet on NAT is routed through the Squid ...
1
vote
1answer
60 views

Configure NAT filtring behavior with iptables

I'm using this rule to configure SNAT: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:4000 I want to specify a rule to filter out packets not destined to the internal ...
1
vote
1answer
95 views

Randomize external port when doing NAT with iptables

I want to configure a NAT behavior different from the default one implemented by iptables. In this example: iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source 193.49.142.107:2000-400 The ...
1
vote
1answer
67 views

iptables - masqueraded NAT has delayed first hop in traceroute

I'm just in the process of setting up my Linux (Debian-based) router with a PPPoE connection via an ADSL/PPPoA -> PPPoE bridge. The connection works perfectly on the router itself but a traceroute ...
1
vote
1answer
54 views

Routing packets between networks with iptables

I'm trying to create a proxy of sorts using just iptables. The linux computer (my proxy) has two ports: p2p1 is connected to the Internet. em1 is connected to a local network. There are two ...
1
vote
0answers
163 views

iptables server behind NAT accessible from outside as well as inside the nat

I have 2 machines with a KVM running on each machine - so two kvms with the below networking Host 1: 192.168.10.100 (eth2) 10.10.100.1 (virbr1) KVM 1 (NAT with Host 1): 10.10.100.128 (eth0 ...
1
vote
1answer
206 views

Conntrack TCP Timeout for state stablished not working

Im using a private IP address and I want to keep alive SNAT entries in my Router (Gateway) for at least two hours (some windows apps of my network are using TCP keepalive set to 2 hours). Gateway is a ...
4
votes
1answer
114 views

Send traffic to self over physical network on Ubuntu

I have a dual port ethernet NIC and let's say I have connected both ports in a loop and assigned the following IPs to the 2 ethernet interfaces: eth2 -> 192.168.2.1 eth3 -> 192.168.3.1 I want to ...
0
votes
1answer
119 views

SSH E-mail login alert if SSH port is as NAT

Can you help me with this problem please? How can I set e-mail alerting after SSH login when port 22 is NATed? I use Linux Debian 7. I have used these iptables rules: eth0 - external network, eth1 - ...
1
vote
1answer
121 views

Why aren't my iptables rules appearing in the relevant list after reboot?

I am trying to write two persistent NAT rules, which I save via iptables-save > /etc/iptables.ipv4.nat, and restore upon reboot via pre-up iptables-restore < /etc/iptables.ipv4.nat in my ...
2
votes
0answers
157 views

IPtables rule to double NAT [closed]

Let me rephrase it.. I just need an IPtable rule to do double NAT-ting.. Host A - Host B - Host C - Host D Host B should do both source NAT and destination NAT, so that my request from Host A ...
2
votes
1answer
301 views

iptables: redirect local request with NAT

I'd like to redirect local requests to port which is translated with NAT. I have following rules: iptables -t nat -A PREROUTING -p tcp --dport 9020 -j DNAT --to 10.0.3.11:80 however request coming ...
0
votes
0answers
25 views

Routing Application through different network interfaces [duplicate]

I have two interfaces on a server, let's call them eth0 and eth1. The underlying server is running CentOS 6.5 I would like to be able for some application to use eht0 while some others use eth1. ...
0
votes
1answer
283 views

iptables Port Forwarding — no service with the port

I have setup a network as in the image below: Firewall (FW) running CentOS 6 has two physical interfaces with subinterfaces: eth0:2 — 10.100.1.78/25 eth0:3 — 10.100.1.79/25 eth3 — 192.168.0.21/24 ...
1
vote
1answer
92 views

Redirection to services in NAT or Bridged Network only with one subdomain

I have one subdomain (dyndns). xyz.dyndns.com (f.e.) Here my question begins: I have a server for virtualisation. On the server I have multiple VMs where different web-services are available ...
1
vote
0answers
165 views

Portforwarding: router nat vs iptables [closed]

I would like to host some services on my pc and make them available from internet. (I'm aware of the security implications, it's more like a test for now). I don't have experience with iptables but I ...
1
vote
0answers
201 views

SNAT / Masquerade with shorewall

I've got a little question about Masquerading and SNAT in combination with shorwall and KVM. The Operating System is Scientific Linux 6.4. Setup is like this at my root server: Virtual Machine IP ...
1
vote
1answer
95 views

How to forward one port to another (on the same machine)?

A machine (M) is behind a NAT. Port X is forwarded through, and available to the internet. My application wants to connect to port Y. How to I configure M to forward incoming data on port X to port ...
2
votes
2answers
757 views

iptables: The “script” way or the “*filter, rules, COMMIT” way?

I'm trying to figure out how NAT and iptables work. While I'm in the trial-and-error phase of learning about it, I found two somewhat conflicting howtos. One howto uses a script to call iptables ...
4
votes
1answer
422 views

How to open VPN connection inside other VPN connection under Linux/Ubuntu

Is it possible to have two VPN connections on top of each other under Ubuntu? Scenario: My organization is quite large and has its own large network. Each group inside the organization has its own ...
2
votes
0answers
34 views

pf out interface?

I'm trying to figure out how to allow all hosts in $dmz to reach any host when egressing $extif. I can't seem to find the equivalence of netfilters "-o $extif", and I'd like to avoid specifically ...
1
vote
1answer
134 views

Managing iptables for home lan routing

I have a LAN at home. One Netgear router - 192.168.0.1 connected to the internet. One Macbook - 192.168.0.10 (connected to Netgear router) One PC with Kali Linux - 192.168.0.20 (connected to ...
0
votes
1answer
2k views

How to redirect to my squid proxy using iptables since DNAT target: only valid in nat table

I want to redirect the traffic in my lan network through squid proxy but I am having some problems with iptables rules. When I use the following rule: # iptables -I FORWARD -s ...
2
votes
0answers
111 views

FreeBSD pf firewall, new connections severly delayed when nating

I have a newly setup fbsd 9.1 with pf, which itself doesn't experience any slowness when for example downloading a debian iso from my local debian repo (ftp.se.debian.org). Any machine behind it, ...
4
votes
1answer
224 views

NetworkManager connection sharing doesn't seem to NAT packets

After setting up network sharing the easy way on the Ubuntu machine, and getting an IP address via DHCP on the Arch Linux machine downstream, the Arch machine is able to ssh to the Ubuntu machine and ...
8
votes
1answer
2k views

Linux as router with multiple internet providers

Linux as router: I have 3 Internet providers, each with its own modem. Provider1, which is gateway address 192.168.1.1 Connected to linux router eth1/192.168.1.2 Provider2, gateway address ...
0
votes
2answers
260 views

PF and types of NAT(Network Address Translation)

As you know, at least 3 types of NAT are used. Of course i need to two types of them.DNAT and SNAT. DNAT : hiding server behind NAT, SNAT : hiding your client behind NAT. Question: I read a quick ...
3
votes
1answer
1k views

iptables: how to allow traffic from redirected port

I have a web service running on debian 7 and listening on port 8080. I want to redirect 80 to 8080 for inbound connections and allow only port 80. Here is my iptables configuration: root@localhost:~# ...
1
vote
1answer
671 views

How does iptables MASQUERADE work on the incoming side?

I'm still reading the iptables manual page and other documents and digging around questions and their answers. This is the problem which arises. When we setup the NAT we use a POSTROUTING rule such ...
2
votes
1answer
297 views

Can iptables be used to convert a single-homed host into a NAT server?

Given: I have a machine (HostA) with only one NIC which has Internet connectivity. I have another machine (HostB) with one NIC on the same switch. HostB is not configured for Internet access yet. ...
1
vote
1answer
1k views

Sniffing VirtualBox machine behind NAT

I have a VirtualBox machine with a single interface connected to VB's NAT mode. What I would like to do is sniff all traffic coming from/to any machine behind that NAT. (I don't think I will need to ...