General discussion

Locked

HOW TO NAT IN LINUX

By dkerta ·
I have web mail in Lotus Notes system. The web main is in my VLAN. I want to access the web mail from internet. I think I need to create NAT in my LINUX pointing to my web main in VLAN. Please advise how to do it.

Regards

This conversation is currently closed to new comments.

6 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by cpfeiffe In reply to HOW TO NAT IN LINUX

iptables has a nat policy. you need to enable iptables (if not already done) and set your nats there. The man page for iptables is good so you should be able to figure it out. Good luck.

Collapse -

by LordInfidel In reply to HOW TO NAT IN LINUX

The actual mechanism in IPTables for inbound NAT is pre-routing, outbound is post-routing....
aka MANGLE.

This is all well and good to know the terms, But since you are asking how to do it, probably means that you have not built an IPTables script by hand.

So, how to you get past your quandry? your in luck, a nifty firewall building tool exists out there called "fwbuilder" (http://fwbuilder.org).

Get yourself a linx box and install it with kde or gnome, download the binaries off of fwuilders site. You will need 5 of them, and install the gcc and gtkmm packages first.

fwbuilder is a gui based, drag and drop firewall builder, and will easily allow you to build your NAT table.

But none of this will do you any good if you do not understand basic firewall building. So I strongly suggest, at the minimum you need to get these 2 books.

1. Linux Firewalls (new riders)
2. Building Internet Firewalls, 2nd Edition (o'reilly)

Collapse -

by richard.lindgren In reply to HOW TO NAT IN LINUX

First you will have to determine if it is NAT you have to enable.
If you are using a public IP address for internet on your gateway/firewall and several private IP addresses on the inside then you need NAT. If this is the case and you can surf the web from inside then NAT is already setup.

If you can't reach your web mail from the outside then you will have to setup a port-forward, known as DNAT in the iptables system. If you get fwbuilder up and running as mentioned in one of the other answers then there should be no problem.

Outherwise you will have to use the shell command iptables. This page gives a short instruction on how to do it: http://netfilter.org/documentation/HOWTO//NAT-HOWTO-6.html#ss6.2
This page gives a more thorough description:
http://iptables-tutorial.frozentux.net/chunkyhtml/index.html

Collapse -

by subhashanarayan In reply to HOW TO NAT IN LINUX

The system where the webmail is installed has got static ip address??. Assuming you have static IP and linux version 8.0 and above. in terminal execute this command
iptables -t nat -A POSTROUTING -o <external interface> -j MASQUERADE.
external interface is eth0 or 1

this will solve your problem

Collapse -

by invite_anil In reply to HOW TO NAT IN LINUX
Collapse -

by fakrul In reply to HOW TO NAT IN LINUX

I think you can do it without iptables/ipchains.
Pls run webserver (apache) in you gateway. And from httpd.conf file redirect any request on port 80 to your lotus notes server. I mean if any one browse the gateway will redirect to the webmail server.

Back to Linux Forum
6 total posts (Page 1 of 1)  

Related Discussions

Related Forums