首页 > linux > iptables 端口针对动态IP(adsl)映射规则

iptables 端口针对动态IP(adsl)映射规则

2011年6月1日 eric 发表评论 阅读评论

iptables -A PREROUTING -t nat -i ppp1 -p tcp –dport 8080 -j DNAT –to 1.1.1.3:22
iptables -A POSTROUTING -t nat -o ppp1 -p tcp -m tcp –dport 8080 -j SNAT –to 1.1.1.1
iptables -A INPUT -p tcp -m state –state NEW –dport 22 -i eth1 -j ACCEPT

iptables -A PREROUTING -t nat -i ppp1 -p tcp –dport 8080 -j DNAT –to 1.1.1.3:22

PREROUTING 规则 把 所有的ppp1设备 8080端口请求 转发到 1.1.1.3 ip 的 22端口

iptables -A POSTROUTING -t nat -o ppp1 -p tcp -m tcp –dport 8080 -j SNAT –to 1.1.1.1

POSTROUTING 规则 把所有 ppp1设备 8080端口请求,转发到 本机器的 网关 IP 1.1.1.1

iptables -A INPUT -p tcp -m state –state NEW –dport 22 -i eth1 -j ACCEPT

允许访问设备 eth1 (也就是网关) 的 22端口

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/471.html

分类: linux 标签:
  1. 2017年10月26日10:13 | #1

    Great blog here! Also your site loads up fast! What web host are you using?
    Can I get your affiliate link to your host? I wish my website loaded up as fast as yours
    lol

  2. 2017年10月26日13:41 | #2

    If you wish for to take a great deal from this post then you have to
    apply these methods to your won blog.

  3. 2017年10月26日23:42 | #3

    This is a very good tip particularly to those fresh to the blogosphere.
    Brief but very accurate info… Thank you for sharing this one.
    A must read article!

  4. 2017年10月28日12:50 | #4

    Attractive section of content. I just stumbled upon your site and in accession capital to assert that I get in fact enjoyed account your blog posts.

    Anyway I will be subscribing to your augment and
    even I achievement you access consistently fast.

  5. 2017年10月29日02:24 | #5

    Amazing! Its truly remarkable piece of writing, I have got much
    clear idea concerning from this post.

  6. 2017年10月29日07:40 | #6

    These are really fantastic ideas in about blogging. You have touched some nice things here.
    Any way keep up wrinting.

  7. 2017年10月29日17:14 | #7

    Hi! I’ve been reading your site for a while now and finally got the
    bravery to go ahead and give you a shout out from Houston Tx!
    Just wanted to say keep up the good work!

  8. 2017年10月29日21:47 | #8

    Cialis Italia Farmacia viagra E’ Sicuro Comprare Viagra On Line Prednisone No Script Canadian How Do I Last Longer

  9. 2017年10月31日03:57 | #9

    obviously like your web-site but you need to take a look at the spelling
    on quite a few of your posts. A number of them are
    rife with spelling issues and I in finding it very bothersome to tell the reality
    however I will definitely come again again.

  10. 2017年10月31日21:49 | #10

    Fine way of describing, and nice post to take data regarding my presentation topic, which i am going to convey in academy.

  11. 2017年11月1日14:31 | #11

    Hi it’s me, I am also visiting this site on a regular basis, this web site
    is actually pleasant and the users are truly sharing nice thoughts.

  12. 2017年11月1日17:45 | #12

    With havin so much written content do you ever run into any problems of plagorism or copyright infringement?
    My website has a lot of completely unique content I’ve either
    written myself or outsourced but it seems a lot of it is popping it up all over the web without my permission. Do you know any techniques to help protect against content from being stolen? I’d genuinely appreciate it.

  13. 2017年11月1日21:01 | #13

    Very nice post. I just stumbled upon your weblog and wanted to say that I’ve truly
    enjoyed surfing around your blog posts. After all I’ll
    be subscribing to your rss feed and I hope you write again soon!

  14. 2017年11月5日06:11 | #14

    Cialis Livraison Rapide En France Cialis Efectos Con Alcohol Amoxicillin For Cats Without A Prescription buy viagra online Discount Isotretinoin Cephalexin Side Effects On Dogs Lowest Canada Pharmacy Prices

  15. 2017年11月6日01:06 | #15

    No matter if some one searches for his essential thing, therefore he/she desires to be available that in detail, thus that thing is maintained over here.

  16. 2017年11月6日13:26 | #16

    Keep this going please, great job!

  17. 2017年11月8日01:10 | #17

    Cheapest Dutasteride generic cialis Purchase 60 Mg Orlistat

  18. 2017年11月11日05:39 | #18

    I really like what you guys tend to be up too. This type of
    clever work and exposure! Keep up the terrific works guys I’ve included you guys to blogroll.

  19. 2017年11月11日18:21 | #19

    It’s the best time to make some plans for the future and it’s time to be
    happy. I have read this post and if I could I wish to suggest you
    few interesting things or advice. Maybe you could write next articles referring to
    this article. I want to read more things about it!

  20. 2017年11月11日20:54 | #20

    Do you have these people to may be more buy indoors?

  21. 2017年11月12日21:09 | #21

    Why people still make use of to read news papers when in this technological world the whole thing is available on net?

  22. 2017年11月13日03:36 | #22

    Hello there! Do you know if they make any plugins to safeguard against hackers?
    I’m kinda paranoid about losing everything I’ve worked hard on. Any suggestions?

  23. 2017年11月14日19:37 | #23

    To keep your valuables in safety?

  24. 2017年11月17日19:39 | #24

    magnificent points altogether, you simply received a logo new reader.
    What might you recommend about your post that you made a few days in the past?
    Any positive?

  25. 2017年11月22日16:22 | #25

    There is certainly a lot to know about this subject. I like all the points
    you’ve made.

  26. 2017年11月25日08:01 | #26

    Excellent article. I am experiencing many of these issues as well..

  27. 2017年11月27日04:34 | #27

    If you wish for to take a good deal from this post then you have to apply these techniques to your won blog.

  28. 2017年11月28日03:45 | #28

    Cialis Kaufen In Der Schweiz viagra Buy Prevacid I.V

  29. 2017年11月29日06:56 | #29

    Does your site have a contact page? I’m having a tough time locating
    it but, I’d like to send you an e-mail. I’ve got some
    creative ideas for your blog you might be interested in hearing.
    Either way, great site and I look forward to seeing it improve over time.

  30. 2017年11月29日08:59 | #30

    Hi! I could have sworn I’ve been to this site before but after
    looking at many of the posts I realized it’s new to me.

    Anyhow, I’m certainly delighted I stumbled upon it and I’ll be bookmarking it and checking back frequently!

  31. 2017年11月29日16:46 | #31

    I think that is among the most important information for me.
    And i’m glad studying your article. But should commentary on some normal issues,
    The site style is perfect, the articles is truly great :
    D. Just right process, cheers

  32. 2017年11月30日18:52 | #32

    Generic Cialis Without A Prescription online pharmacy Achat Cialis Au Maroc Vendita Cialis Senza Ricetta

  33. 2017年12月1日11:39 | #33

    online casino to play poker
    casino
    rtg casinos accepting us players

  34. 2017年12月4日16:19 | #34

    Greetings from Florida! I’m bored at work so I decided to check out your blog on my iphone during lunch break.
    I enjoy the information you present here and can’t
    wait to take a look when I get home. I’m amazed at how fast your
    blog loaded on my phone .. I’m not even using WIFI, just 3G ..
    Anyhow, wonderful site!

  35. 2017年12月14日02:52 | #35

    Inspiring story there. What occurred after?
    Thanks!

  36. 2017年12月15日13:39 | #36

    Right here is the right webpage for everyone who hopes to find out about this topic.

    You realize so much its almost hard to argue with you (not that
    I really would want to…HaHa). You definitely put a new spin on a subject that has been written about
    for many years. Wonderful stuff, just wonderful!

  37. 2017年12月26日10:48 | #37

    online casino real money
    casino online
    online casino games
    casino online usa
    casino games

  38. 2018年1月4日02:20 | #38

    payday loans online
    loans for bad credit
    payday loans no credit
    payday loans online no credit check
    payday loans

  39. 2018年1月6日22:31 | #39

    online casino real money
    freeslots
    free casino games slot machines
    slots for free
    free slots no download

  40. 2018年1月12日12:07 | #40

    product serial number autocad 2013
    autodesk autocad
    autocad revit student download

  41. 2018年1月14日12:43 | #41

    payday loans online no credit check
    payday loans no credit check
    loans no credit check
    loans no credit check
    payday loans online no credit check

  42. 2018年1月18日22:39 | #42

    payday loans
    payday loans no credit check
    payday loans no credit check
    payday loans
    payday loans

  43. 2018年1月21日01:52 | #43

    I do not know if it’s just me or if everyone else experiencing problems with your blog.
    It appears as if some of the written text in your posts are running
    off the screen. Can somebody else please comment and let
    me know if this is happening to them too? This
    may be a problem with my web browser because I’ve had
    this happen before. Many thanks

  44. 2018年1月21日09:03 | #44

    I am really loving the theme/design of your website. Do you ever
    run into any internet browser compatibility problems?
    A small number of my blog audience have complained
    about my website not operating correctly in Explorer but
    looks great in Safari. Do you have any tips to help
    fix this problem?

  45. 2018年1月21日15:45 | #45

    list of all harrah’s casinos
    us online casinos
    online casino game
    heart of vegas free slots
    top online casino

  46. 2018年1月21日23:07 | #46

    Greetings! Very helpful advice in this particular post!
    It’s the little changes that make the biggest changes.
    Thanks for sharing!

评论分页
1 2 3 4 471
订阅评论
4+7= (必填)