net4people / bbs

Forum for discussing Internet censorship circumvention
3.22k stars 75 forks source link

Ip forwarding between two linux server #170

Closed MHmansouri closed 1 year ago

MHmansouri commented 1 year ago

I have two linux server to run a vpn server, one from Germany and other in Iran, but in Iran because of some policy for hard filtering after two or something like that in hour my Germany ip is filtered. How can i forwarding ip to my Germany server without leaking information or anyway for securely to do that?

I do some basic ip forwarding and cause this problem...

seniormmd1 commented 1 year ago

تلکرام به من پیام بده یادت بدم @[REDACTED]

Telegram send me a message @[REDACTED]

wkrp commented 1 year ago

@Mhmansouri you probably want to read existing threads on multi-hop proxies for Iran.

This forum is not for user support or troubleshooting. There are other places that are better for that. Here, it is best if you can provide technical detail that is useful for researchers or developers.

farhadsaberi commented 1 year ago

sysctl net.ipv4.ip_forward=1 iptables -t nat -A PREROUTING -p tcp --dport 22 -j DNAT --to-destination 'Ip-Server-Germany' iptables -t nat -A PREROUTING -j DNAT --to-destination 'Ip-Server-Iran' iptables -t nat -A POSTROUTING -j MASQUERADE