walczę już jakiś czas z przekierowaniem portów na moim serwerze VPS wprost do mojego lokalnego IP po PPTDP. Kiedyś działało bez problemu a teraz nie mam pojęcia czemu porty są nie przekierowane, dodam że przy połączeniu przez PPTPD mam internet.
rc.local
Kod: Zaznacz cały
iptables -I INPUT -p tcp --dport 1723 -m state --state NEW -j ACCEPT
iptables -I INPUT -p gre -j ACCEPT
iptables -t nat -I POSTROUTING -o enp1s0 -j MASQUERADE
iptables -I FORWARD -p tcp --tcp-flags SYN,RST SYN -s 192.168.1.0/24 -j TCPMSS --clamp-mss-to-pmtu
iptables -t nat -A POSTROUTING -s 192.168.1.0/24 -o enp1s0 -j MASQUERADE
iptables -A FORWARD -p tcp --syn -s 192.168.1.0/24 -j TCPMSS --set-mss 1356
iptables -t nat -A PREROUTING -p tcp -d IP_SERWERA --dport 8000 -j DNAT --to-destination 192.168.1.234:8000
Kod: Zaznacz cały
enp1s0 Link encap:Ethernet HWaddr fa:16:3e:45:c8:04
inet addr:IP_Servera Bcast:IP_Maski Mask:255.255.240.0
inet6 addr: fe80::f816:3eff:fe45:c804/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:445 errors:0 dropped:0 overruns:0 frame:0
TX packets:378 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:451112 (451.1 KB) TX bytes:60999 (60.9 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:160 errors:0 dropped:0 overruns:0 frame:0
TX packets:160 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:11840 (11.8 KB) TX bytes:11840 (11.8 KB)
ppp0 Link encap:Point-to-Point Protocol
inet addr:192.168.1.10 P-t-P:192.168.1.234 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1396 Metric:1
RX packets:55 errors:0 dropped:0 overruns:0 frame:0
TX packets:36 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:9492 (9.4 KB) TX bytes:8036 (8.0 KB)
Kod: Zaznacz cały
PPP adapter VPN:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : VPN
Physical Address. . . . . . . . . :
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv4 Address. . . . . . . . . . . : 192.168.1.234(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.255
Default Gateway . . . . . . . . . : 0.0.0.0
DNS Servers . . . . . . . . . . . : 8.8.8.8
8.8.4.4
NetBIOS over Tcpip. . . . . . . . : Enabled