LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 08-27-2001, 01:47 PM   #1
hirschma
LQ Newbie
 
Registered: Aug 2001
Location: new york, NY
Distribution: slackware
Posts: 2

Rep: Reputation: 0
iptables mobile users prob


How do you set up iptables, using nat and forwarding, so that users can use the same server names inside and outside the firewall?

For example, here's a snippet from my firewall script:

iptables -t nat -A PREROUTING -i ppp0 -p tcp -d 1.2.3.4 --dport 25 -j DNAT --to 192.168.1.202:25

iptables -A FORWARD -i ppp0 -o eth1 -p tcp -m state --state NEW --syn -d 192.168.1.202 --dport 25 -j ACCEPT

assume similar for udp stuff.

Now, what is working now is that users outside the firewall can use the DNS name for SMTP, but users inside have to use the private address 192.168.1.202 or the internal DNS name that corresponds to it.

I can ping the external name from inside the firewall, but connections are refused. Any clues?

jonathan
 
Old 09-13-2001, 03:00 PM   #2
alpha-wolf
LQ Newbie
 
Registered: Aug 2001
Location: Germany
Distribution: SuSE
Posts: 21

Rep: Reputation: 15
I think there might be two possibilities:
- PREROUTE an internal request to the external IP also to the internal SMTP-server, same rule just another interface:
iptables -t nat -A PREROUTING -i eth1 -p tcp -d 1.2.3.4 --dport 25 -j DNAT --to 192.168.1.202:25
same with the forward-chain.

- run an internal name server that resolves external-names to internal IPs like 192.168.1.202

alpha-wolf
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Charlotte Church's mobile phone Oops! Topless photo jumps through mobile phones in UK furfurdemon666 General 3 05-03-2005 08:03 AM
iptables prob in /var/log/messages globeTrotter Linux - Networking 9 11-17-2004 03:02 PM
Postfix prob with SE-K700i mobile email client chazza Linux - Networking 1 09-03-2004 09:59 AM
iptables script prob Neomaster Linux - Networking 5 06-07-2003 07:01 PM
prob with iptables sandy Linux - Networking 1 04-14-2003 03:08 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration