Sponsored Content
Special Forums IP Networking howto start with gateway / router / masquerading Post 302342948 by Zykl0n-B on Tuesday 11th of August 2009 06:16:01 AM
Old 08-11-2009
Code:
Second, I understand that this means no limitation, no control and no secutity at all in the network traffic

Oh yeah, netfilter/iptables means packets limitation, traffic control and high security for the network.

The only device that is able to interconnect two logical networks is a router, so you want to interconnect three networks, then what you need is a router.

With iptables you can easily set up a router/firewall device for your network. It's included with Linux, so you don't have to pay or download anything at all.

What i understand of your needs is to set cassiopeia host to do something like this:

Image
So, if i'm right you'll need three network interfaces and the problem is solved, here is how you must set iptables to make this work:


Code:
echo 1 >/proc/sys/net/ipv4/ip_forward
echo 0 >/proc/sys/net/ipv4/conf/all/send_redirecs
iptables -t nat -F
iptables -F
iptables -X
iptables -Z
iptables -A INPUT ACCEPT
iptables -A OUTPUT ACCEPT
iptables -A FORWARD ACCEPT
 
iptables -t nat -A POSTROUTING -s 172.16.199.0/24 -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 172.16.70.0/24 -o eth1 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 192.168.1.0/25 -o eth2 -j MASQUERADE

I think this should work,
best regards
Zykl0n-B
 

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remote Unix printing to my WinXP works with no router. How can I make it work through my router?

I set up remote printing on a clients Unix server to my Windows XP USB printer. My USB printer is connected directly to my PC (no print server and no network input on printer). With my Win XP PC connected to my cable modem (without the router), i can do lp -dhp842c /etc/hosts and it prints. I... (7 Replies)
Discussion started by: jmhohne
7 Replies

2. Linux

GNUGK-How to setup static gateway to gateway routing

Dear Sir I am a newbie in the world of IP telephony. I have been working with Asterisk PBX (SIP) and Cisco Call Manager (MGCP) but now I am learning on how to work GNUGK for H.323 Gatekeeper. I am having a problem, configuring static call routing on GNUGK in the section ... (0 Replies)
Discussion started by: mfondoum
0 Replies

3. UNIX for Beginners Questions & Answers

Inconsistency between RedHat 6.5 global gateway and single gateway leads to loss of default gateway

Dear friends I use RedHat 6.5, which sets the gateway in the configuration file / etc / sysconfig / network as GATEWAY = 192.168.1.26, and the gateway in the configuration file / etc / sysconfig / network-scripts / ifcfg-eth11 as GATEWAY = 192.168.1.256. The two gateways are different.... (6 Replies)
Discussion started by: tanpeng
6 Replies

4. UNIX for Beginners Questions & Answers

Howto auto boot SPARC | How to auto supply "start /SYS" and "start /SP/console" commands

When I power ON my T4-1, I got a prompt -> where I have to start /SYS and start /SP/console. How can I auto supply these two commands ? (3 Replies)
Discussion started by: z_haseeb
3 Replies
iptables-apply(8)					      System Manager's Manual						 iptables-apply(8)

NAME
iptables-apply - a safer way to update iptables remotely SYNOPSIS
iptables-apply [-hV] [-t timeout] ruleset-file DESCRIPTION
iptables-apply will try to apply a new ruleset (as output by iptables-save/read by iptables-restore) to iptables, then prompt the user whether the changes are okay. If the new ruleset cut the existing connection, the user will not be able to answer affirmatively. In this case, the script rolls back to the previous ruleset after the timeout expired. The timeout can be set with -t. When called as ip6tables-apply, the script will use ip6tables-save/-restore instead. OPTIONS
-t seconds, --timeout seconds Sets the timeout after which the script will roll back to the previous ruleset. -h, --help Display usage information. -V, --version Display version information. SEE ALSO
iptables-restore(8), iptables-save(8), iptables(8). LEGALESE
iptables-apply is copyright by Martin F. Krafft. This manual page was written by Martin F. Krafft <madduck@madduck.net> Permission is granted to copy, distribute and/or modify this document under the terms of the Artistic License 2.0. 2006-06-04 iptables-apply(8)
All times are GMT -4. The time now is 06:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy