Mailing List
Home
Forum Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Installation - Getting started with Red Hat Linux
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
Forwarding and masquerding

Forwarding and masquerding

2005-01-28       - By Alexey Fadyushin

 Back
Reply:     1     2     3     4  

Connect your internal network (which is to be masqueraded) to one
interface (for exapmle, eth1) and line to outer network to another
interface (eth0).

To use masquerading, put the following lines into iptables configuration
(/etc/sysconfig/iptables):
Into table nat, chain POSTROUTING put the following string

-A POSTROUTING -s <internal network address space> -j SNAT --to-source
<address of gateway's external interface>

This will do the masquerading. Then allow the forwarding of packets
between internal and external addresses (table 'filter' chain FORWARD):

-A FORWARD -s <internal network address space> -j ACCEPT

Or simply set the default rule of FORWARD chain to ACCEPT.
Then reload iptables rules:

service iptables restart

Then switch on the forwarding in the kernel

echo 1 > /proc/sys/net/ipv4/ip_forward

And put appropriate line into /etc/sysctl.conf so the forwarding will be
switched on after each reboot:
net.ipv4.ip_forward = 1

Also I recommend to switch on the use of iptales helpers for at least
FTP protocol. The list of helpers to be loaded at iptables restart is in
file /etc/sysconfig/iptables-config, parameter IPTABLES_MODULES.

Than you should configure all computers in the internal network to use
you gateway (address of its network card connected to the internal
network) as a default gateway.

Alexey Fadyushin.
Brainbench MVP for Linux.
http://www.brainbench.com

Marcos Osorio wrote:
> Hi, i installed a Red Hat Enterprise Edition 3 and i want to use this
> server as a gateway, so, my quiestion is:
> How can i forward and do masquerading of the others pcs, i have to nics,
> eth0 and eth1, so is there any aplication or script?
> thanks.  
>  
>
>
> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
>
> __ ____ ____ ____ ____ ____ ____ ____ ____ ____
> Redhat-install-list mailing list
> Redhat-install-list@(protected)
> https://www.redhat.com/mailman/listinfo/redhat-install-list
> To Unsubscribe Go To ABOVE URL or send a message to:
> redhat-install-list-request@(protected)
> Subject: unsubscribe

__ ____ ____ ____ ____ ____ ____ ____ ____ ____
Redhat-install-list mailing list
Redhat-install-list@(protected)
https://www.redhat.com/mailman/listinfo/redhat-install-list
To Unsubscribe Go To ABOVE URL or send a message to:
redhat-install-list-request@(protected)
Subject: unsubscribe

Earn $52 per hosting referral at Lunarpages.