朱纯树博客
VPS测评推荐网站
cloudacead cloudacead

使用Socat进行简单的IPv4/IPv6端口转发

Socat是一个简单且高效能的端口转发软件,支持IPv4和IPv6、TCP和UDP。对于家庭宽带仅有公网IPv6的情况很有帮助,并且openwrt下可以直接通过opkg install socat来安装Socat。

  • 监听IPv4的80端口的TCP协议,并转发到192.168.1.100的8080端口
socat TCP4-LISTEN:80,reuseaddr,fork TCP4:192.168.1.100:8080

但在使用的过程中,遇到了一个问题,按照网上的教程,转发IPv6的同时,会占用IPv4的相同端口,导致IPv4和IPv6的相同端口不能用于不同的用途。经过翻看Socat源码后,终于找到了监听IPv6的同时不占用IPv4相同端口的附加参数ipv6-v6only=1

  • 监听IPv6的80端口(会同时占用IPv4的80端口)的TCP协议,并转发到192.168.1.100的8080端口
socat TCP6-LISTEN:80,reuseaddr,fork TCP4:192.168.1.100:8080
  • 仅监听IPv6的80端口(不占用IPv4的80端口)的TCP协议,并转发到192.168.1.100的8080端口
socat TCP6-LISTEN:80,ipv6-v6only=1,reuseaddr,fork TCP4:192.168.1.100:8080


文章来源于互联网:使用Socat进行简单的IPv4/IPv6端口转发

赞(0) 打赏
未经允许不得转载:VPS测评推荐网站 - 朱纯树博客 » 使用Socat进行简单的IPv4/IPv6端口转发

评论 729

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #735

    buy cialis pills 2017; Abramo et al

    kayakiree4小时前回复
  2. #734

    What is it called when a woman gets turned on
    Erectile dysfunction is story of the men’s sexual healthfulness disorders. It is cognized as an ineptitude of men to attain erection during sexual intercourse equable if they are sexually excited. Other symptoms of ED are, either it remains championing a dumpy while or does not occur at all. It is a repeated process. Erectile dysfunction is also called a type of impotence. Weakness is a encyclopaedic point of view and covers innumerable other men’s health sensuous disorders like- premature ejaculation, dearth of sexual pine, etc. Erectile dysfunction does not contain these problems. All these problems correlated to Erectile dysfunction can be cured with the help of cheap viagra online uk and other how to buy over the counter viagra medicines.

    Causes
    Erectile dysfunction does not be undergoing any circumscribed cause. There are uncountable reasons behind its occurrence. It can be- medic reasons, your form problems, medicines you are delightful, fervid reasons, и так далее Charter out’s deliver a look on ED causes in particular. Erectile dysfunction causes are- high blood pressure, diabetes, lofty blood cholesterol, nerve diseases (Parkinson’s disability and multiple sclerosis), surgery, subdued hormone levels, lifestyle factors (smoking and drinking) and others (upset, nervousness, nervousness, misgivings, bust). Aging factors also lead to ED, but aging in itself is not a cause. Deficient testosterone levels also in some cases command to erectile dysfunction. Side effects caused close to medications also make men unfit in compensation erection.

    But there is nothing to agonize far as treatments are on tap also in behalf of ED. A specific such present treatment for ED is get viagra prescription.

  3. #733

    Males frequently acquaintance erections, now called boners, without physical or psychological stimulation. While it is mostly not a cause for relevant to, it can feel embarrassing. Source: what is cialis taken for

  4. #732

    ED is when you regularly cannot get and board an erection. It may lone meet with in some situations – notwithstanding instance, you may be clever to pick up an erection when masturbating, but not when you’re with a partner.
    Source: generic tadalafil

  5. #731

    https://zithromax.science/# zithromax online usa no prescription

    Thomasbix3天前回复
  6. #730

    Little short of all cases of erectile dysfunction are treatable, and treatment can lead to advantage comprehensive mortal and high-strung robustness on nearly every serene as well as improve intimacy in search couples. Source: cialis no prescription

  7. #729

    metronidazole over the counter sleep aids over the counter

    RichardAnisp5天前回复
  8. #728

    Pills facts in compensation patients. Effects of Soporific Abuse. generic cialis tadalafil tadalafil 20 mg tablet cost cost of 5mg cialis daily

  9. #727

    Friedländer, M lasix purchase online