#1  
Old 21st June 2010, 08:52
Paladinemishakal Paladinemishakal is offline
Junior Member
 
Join Date: Jan 2008
Posts: 12
Thanks: 0
Thanked 1 Time in 1 Post
Default Configuring Iptables

Hi All,

I have a problem with configuring iptables. I have the following servers setup in a cloud environment:
Server #1
eth0
IP: 109.123.94.15
GW: 109.123.94.1

eth0:1
IP: 10.0.2.139

Route:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 * 255.255.255.0 U 0 0 0 eth0
109.123.94.0 * 255.255.255.0 U 0 0 0 eth0
default gw64-fastest.uk 0.0.0.0 UG 0 0 0 eth

Server #2
eth0
IP: 109.123.98.115
GW: 109.123.98.1

eth0:1
IP: 10.0.2.191

Route:
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.2.0 * 255.255.255.0 U 0 0 0 eth0
109.123.98.0 * 255.255.255.0 U 0 0 0 eth0
default gw64-fastest.uk 0.0.0.0 UG 0 0 0 eth

As this setup is residing in a cloud environment, it has a defined set of route which I cannot change and I cannot add another network adapter (eg. eth1). Also whenever I added a gateway to the eth0:1 of Server #2, the server is not stable and will refuse connections after a while.

What I want to do here is:
1. setup iptables in Server #1 to act as the gateway for Server #2.
2. setup iptables in Server #2 to block all port except SSH and internally to route all traffic to exit via Server #1.

Can anyone show me what I need to put into the iptables rules?
Reply With Quote
Sponsored Links
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Faster Postfix problems pedrovalmor Installation/Configuration 6 10th June 2010 22:11
Xen on Ubuntu kmand HOWTO-Related Questions 17 5th March 2009 18:43
Iptables gateway with one lan adapter tsmr Installation/Configuration 1 7th August 2008 12:02
IPtables rule to let PPTP access LAN brianwebb01 Installation/Configuration 0 1st May 2008 21:23
Match IP with MAC using iptables for squid block cooljai Server Operation 0 30th August 2007 18:30


All times are GMT +2. The time now is 16:37.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.